Skip to content

Commit f526807

Browse files
authored
[5.9] Ensure module tracing is off when checking disable-implicit* flags (#68455)
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)
1 parent 9036b03 commit f526807

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/modules/SwiftImplicitImport.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ function(swift_supports_implicit_module module_name out_var)
33
file(WRITE "${CMAKE_BINARY_DIR}/tmp/empty-check-${module_name}.swift" "")
44
execute_process(
55
COMMAND
6+
${CMAKE_COMMAND}
7+
-E env --unset=SWIFT_LOADED_MODULE_TRACE_FILE
68
"${CMAKE_Swift_COMPILER}"
79
-Xfrontend -disable-implicit-${module_name}-module-import
810
-Xfrontend -parse-stdlib

0 commit comments

Comments
 (0)