Skip to content

Honor CMAKE_INSTALL_BINDIR #4714

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 2 commits into from
Mar 16, 2023
Merged

Honor CMAKE_INSTALL_BINDIR #4714

merged 2 commits into from
Mar 16, 2023

Conversation

tristanlabelle
Copy link
Contributor

@tristanlabelle tristanlabelle commented Mar 9, 2023

CMake install places binary files under the CMAKE_INSTALL_BINDIR subdirectory, but some CMake files hardcode bin instead (the default value). This change un-hardcodes these. This has no effect by default, but it will allow redirecting the binaries to a different output directory, which will help with packaging installers for multiple architectures in the Windows build.

@tristanlabelle tristanlabelle marked this pull request as ready for review March 10, 2023 13:43
Copy link
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.

@compnerd
Copy link
Member

@swift-ci please test

@compnerd
Copy link
Member

@swift-ci please test Linux platform

@tristanlabelle
Copy link
Contributor Author

The Linux CI build is still hitting the seemingly unrelated:

/home/build-user/swift-tools-support-core/Sources/TSCBasic/ByteString.swift:11:8: error: no such module 'Foundation'
import Foundation
       ^

@compnerd
Copy link
Member

@swift-ci please test Linux platform

@tristanlabelle
Copy link
Contributor Author

The linux CI still failed on an apparently unrelated issue. It's succeeded building and failed in tests:

******************** TEST 'Swift-validation(linux-x86_64) :: stdlib/UnsafeBufferPointerSlices.swift' FAILED ********************
couldn't parse text: '://106656555'
in expression: 'rdar://106656555'
in REQUIRES: directive on test line 4
********************

@compnerd
Copy link
Member

@swift-ci please test Linux platform

@tristanlabelle
Copy link
Contributor Author

Ah! It looks like in the linux build, CMAKE_INSTALL_LIBDIR expands to lib/x86_64-linux-gnu

@tristanlabelle tristanlabelle changed the title Un-hardcode cmake install directories Honor CMAKE_INSTALL_BINDIR Mar 15, 2023
@tristanlabelle
Copy link
Contributor Author

The latest change scopes down to only replacing bin with CMAKE_INSTALL_BINDIR and leaving lib alone given the variation of the linux build and that for the Windows installer purposes, we only need to override the bin dir. @compnerd , could you re-kick the CI?

@compnerd
Copy link
Member

@swift-ci please test

@compnerd compnerd merged commit e79e6c4 into swiftlang:main Mar 16, 2023
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