Skip to content

Add Windows build settings to find Windows SDK#279

Open
dschaefer2 wants to merge 1 commit into
swiftlang:mainfrom
dschaefer2:windowsBuild
Open

Add Windows build settings to find Windows SDK#279
dschaefer2 wants to merge 1 commit into
swiftlang:mainfrom
dschaefer2:windowsBuild

Conversation

@dschaefer2
Copy link
Copy Markdown
Member

Adds in the C settings to add the include path to the Windows SDK. Unsafe flags are no longer enforced starting in 6.2 enabling us to specify these absolute path names.

Adds in the C settings to add the include path to the Windows
SDK. Unsafe flags are no longer enforced enabling us to specify
these absolute path names.
@dschaefer2
Copy link
Copy Markdown
Member Author

@swift-ci please test windows

Copy link
Copy Markdown
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do the look up for SDKROOT once?

Comment thread Package.swift
Comment on lines +137 to +140
.unsafeFlags([
"-I" + (ProcessInfo.processInfo.environment["SDKROOT"] ?? "") + "\\usr\\include",
"-I" + (ProcessInfo.processInfo.environment["SDKROOT"] ?? "") + "\\usr\\include\\Block",
], .when(platforms: [.windows])),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that we should just not add the flags if SDKROOT is unset.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair. It's a pretty ugly default. I'll rejig this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants