Skip to content

[5.9] Ensure module tracing is off when checking disable-implicit* #68455

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

edymtt
Copy link
Contributor

@edymtt edymtt commented Sep 12, 2023

…flags

In some internal configurations we set the
SWIFT_LOADED_MODULE_TRACE_FILE environment variable when running the build of the compiler -- as a result, this causes -parse to always fails, preventing to detect properly if we can use disable-implicit* flags.

(cherry picked from commit ec49873)

Explanation: explicitly unset SWIFT_LOADED_MODULE_TRACE_FILE when detecting if the Swift compiler supporst disable-implicit* flags -- this is to prevent the -parse invocation we use for such detection to fail unconditionally
Radar: rdar://115338219
Scope: build logic used to detect if the compiler supports disable-implicit*
Risk: low

  • we manipulate the environment variables only during this detection, preventing side effects to the rest of the configuration and thebuild
  • SWIFT_LOADED_MODULE_TRACE_FILE is mostly used in internal configuration, and should not affect opensource

Testing: run a local Darwin build setting SWIFT_LOADED_MODULE_TRACE_FILE manually, checked that the disable-implicit flags are correctly used during builds of the compiler
Reviewed by:

…flags

In some internal configurations we set the
`SWIFT_LOADED_MODULE_TRACE_FILE` environment variable when running the
build of the compiler -- as a result, this causes `-parse` to always
fails, preventing to detect properly if we can use `disable-implicit*`
flags.

Addresses rdar://115338219

(cherry picked from commit ec49873)
@edymtt edymtt requested a review from a team as a code owner September 12, 2023 11:53
@edymtt
Copy link
Contributor Author

edymtt commented Sep 12, 2023

@swift-ci please test

@edymtt edymtt merged commit f526807 into swiftlang:release/5.9 Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants