Skip to content

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

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

eeckstein
Copy link
Contributor

@eeckstein eeckstein commented Apr 9, 2022

After the rename of the enable-cxx-interop option to enable-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

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
@eeckstein eeckstein requested a review from zoecarver April 9, 2022 08:56
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

@finagolfin
Copy link
Member

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.

@eeckstein eeckstein merged commit 728f77c into swiftlang:main Apr 11, 2022
@eeckstein eeckstein deleted the fix-hosttools-mode branch April 11, 2022 05:45
@zoecarver
Copy link
Contributor

I do not think this is the correct way to proceed. Let's discuss later today.

Comment on lines +831 to +834
def enable_cxx_interop :
Flag<["-"], "enable-cxx-interop">,
HelpText<"Alias for -enable-experimental-cxx-interop">,
Flags<[FrontendOption, HelpHidden]>;
Copy link
Contributor

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"
Copy link
Contributor

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?

Copy link
Contributor Author

@eeckstein eeckstein Apr 12, 2022

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.

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.

3 participants