-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Build System: CMake] Install the apinotes in the 'compiler' install component. #24419
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
Conversation
@swift-ci please smoke test |
|
||
# This is overly conservative, but we have so few API notes files that | ||
# haven't migrated to the Swift repo that it's probably fine in practice. | ||
DEPENDS copy_apinotes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still relevant; this is about the build you're in the process of doing rather than the install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated this to keep the dependency when building the standard library with the compiler, but also allow building standalone without the dependency.
swift_install_in_component(DIRECTORY "${output_dir}" | ||
DESTINATION "lib/swift/" | ||
COMPONENT sdk-overlay | ||
OPTIONAL) | ||
COMPONENT compiler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as they don't get installed on Linux…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should only make this target if building for an Apple platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tricky because of cross-compilers, but that might be a case we can afford to ignore for now.
759d5c5
to
9666860
Compare
@swift-ci please clean test |
Build failed |
Build failed |
CMakeLists.txt
Outdated
set(_swift_install_apinotes_default TRUE) | ||
endif() | ||
|
||
option(SWIFT_INSTALL_APINOTES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be called SWIFT_INCLUDE_APINOTES
? It would be more in-line with other options like it. This does control if the targets are created, but not if they're actually installed. You still need to be installing the compiler
component for them to be actually installed.
…component when compiling for Darwin platforms. Setting the CMake cache variable SWIFT_INCLUDE_APINOTES to true will override the default behavior and unconditionally create the install targets.
9666860
to
c10b815
Compare
@swift-ci please clean test |
Build failed |
Build failed |
I've updated my PR to now include a new CMake cache option |
We should always install the remaining
apinotes
when building and installing thecompiler
component. That way they'll always end up in the toolchain, even if you aren't building the standard library.rdar://50390238