Skip to content

build: remove extra defines on Windows #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,12 @@
import PackageDescription

#if os(Windows)
#if arch(i386) || arch(x86_64)
var cSettings: [CSetting] = [
.define("_X86_", .when(platforms: [.windows])),
]
#elseif arch(arm) || arch(arm64)
var cSettings: [CSetting] = [
.define("_ARM_", .when(platforms: [.windows])),
]
#else
#error("unsupported architecture")
#endif
// When building the library on Windows, we do not have proper control of
// whether it is being built statically or dynamically. However, given the
// current default of static, we will assume that we are building
// statically. More importantly, should this not hold, this will fail at
// link time.
cSettings += [
let cSettings: [CSetting] = [
.define("CMARK_GFM_STATIC_DEFINE", .when(platforms: [.windows])),
.define("CMARK_GFM_EXTENSIONS_STATIC_DEFINE", .when(platforms: [.windows])),
]
Expand Down