-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix the 'hosttools' bootstrapping build mode #42279
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
After the rename of the `enable-cxx-interop` option to `enable-experimental-cxx-interop` it was no longer possible to build with installed tools. This change re-introduces the `enable-cxx-interop` option for backward compatibility
@swift-ci smoke test |
Btw, I've setup a special crosscompile build of my Android toolchain that cross-compiles libswift only with a prebuilt official Swift toolchain for linux, ie without building the linux toolchain from source first as the current crosscompile of libswift assumes. Would you like me to submit that here, gated under a flag? I'm not sure if you'd find that worth having upstream here. |
I do not think this is the correct way to proceed. Let's discuss later today. |
def enable_cxx_interop : | ||
Flag<["-"], "enable-cxx-interop">, | ||
HelpText<"Alias for -enable-experimental-cxx-interop">, | ||
Flags<[FrontendOption, HelpHidden]>; |
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 is really important that we have the word "experimental" in this flag. This is an expirmental feature, we need to make sure that's communicated to people using it.
Slightly related: I also want to add a warning anytime someone enables this.
@@ -74,7 +74,7 @@ function(add_swift_compiler_modules_library name) | |||
|
|||
set(swift_compile_options | |||
"-Xfrontend" "-validate-tbd-against-ir=none" | |||
"-Xfrontend" "-enable-experimental-cxx-interop" |
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.
Can't we do this conditionally based on the version of the 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.
Why would we want to conditionally select between two options which do the same thing?
Aha yes, that's possible. Feel free to change it.
The only important thing is to not break the hosttools
build mode.
After the rename of the
enable-cxx-interop
option toenable-experimental-cxx-interop
(#42251) it was no longer possible to build with installed tools.This change re-introduces the
enable-cxx-interop
option for backward compatibility