Skip to content

Pass toolchain settings when using XCBuild #3709

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
Sep 8, 2021
Merged

Conversation

neonichu
Copy link
Contributor

@neonichu neonichu commented Sep 2, 2021

This is a follow-up to #3695, adding various other settings of the toolchain that we weren't yet correctly forwarding when XCBuild is being used.

rdar://82313817

@neonichu
Copy link
Contributor Author

neonichu commented Sep 2, 2021

@swift-ci please smoke test

@neonichu
Copy link
Contributor Author

neonichu commented Sep 2, 2021

@DougGregor how can we test that this isn't regressing #3695? I moved things around a bit to bring them more in line with how the toolchain settings are handled when using SwiftPM's own build system.

@DougGregor
Copy link
Member

Only way I know how is to open a PR against the Swift repo and do "@swift-ci please build toolchain macOS" in the same comment as you reference this PR. That'll trigger the cross-repo toolchain build to test this change

@neonichu
Copy link
Contributor Author

neonichu commented Sep 3, 2021

/Users/buildnode/jenkins/workspace/swift-package-manager-with-xcode-self-hosted-PR-osx/branch-main/swiftpm/Tests/XCBuildSupportTests/PIFBuilderTests.swift:466: error: -[XCBuildSupportTests.PIFBuilderTests testExecutableProducts] : XCTAssertTrue failed - settings are left unchecked: ["LIBRARY_SEARCH_PATHS"]

Interesting, I didn't see this failure locally, but it makes sense.

@neonichu neonichu force-pushed the toolchain-paths-xcbuild branch from 7aa1056 to efac10f Compare September 3, 2021 17:51
@neonichu
Copy link
Contributor Author

neonichu commented Sep 3, 2021

@swift-ci please smoke test

@neonichu
Copy link
Contributor Author

neonichu commented Sep 3, 2021

From the toolchain PR:

20:33:14 28%: Register execution policy exception for PackagePlugin.o
20:33:14 28%: Link libPackagePlugin.dylib (x86_64)
20:33:14 ld: warning: Could not find or use auto-linked library 'swiftCompatibilityConcurrency'
20:33:15 Undefined symbols for architecture x86_64:
20:33:15   "__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency", referenced from:
20:33:15 
20:33:15       __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_PackagePlugin in PackagePlugin.o
20:33:15 
20:33:15 ld: symbol(s) not found for architecture x86_64

So it looks like dynamic products also need the extra library search path, I think this is also not working correctly in SwiftPM's own build system.

@neonichu neonichu force-pushed the toolchain-paths-xcbuild branch from efac10f to c5d7fe0 Compare September 3, 2021 20:18
@neonichu
Copy link
Contributor Author

neonichu commented Sep 3, 2021

@swift-ci please smoke test

@neonichu
Copy link
Contributor Author

neonichu commented Sep 7, 2021

Looks like building the toolchain succeeded with the latest version, so this should be good to go.

This is a follow-up to #3695, adding various other settings of the toolchain that we weren't yet correctly forwarding when XCBuild is being used.

rdar://82313817
@neonichu neonichu force-pushed the toolchain-paths-xcbuild branch from c5d7fe0 to 2313216 Compare September 7, 2021 21:53
@neonichu
Copy link
Contributor Author

neonichu commented Sep 7, 2021

Updated the plugin case. Don't think we need to re-run the toolchain build since that shouldn't be reached anyway in practice.

@neonichu
Copy link
Contributor Author

neonichu commented Sep 7, 2021

@swift-ci please smoke test

@neonichu neonichu merged commit 329da56 into main Sep 8, 2021
@neonichu neonichu deleted the toolchain-paths-xcbuild branch September 8, 2021 03:52
mattt pushed a commit to mattt/swift-package-manager that referenced this pull request Sep 16, 2021
This is a follow-up to swiftlang#3695, adding various other settings of the toolchain that we weren't yet correctly forwarding when XCBuild is being used.

rdar://82313817
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.

4 participants