Skip to content

Commit a5ae7b0

Browse files
authored
Merge pull request #72405 from edymtt/emiotto/no-module-trace-file-during-cmake-swift-configuration
[CMake] Ensure module tracing is off during configuration
2 parents 0e2c41c + 5aaaae5 commit a5ae7b0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ include(FetchContent)
100100
# optional until we have a bootstrap story.
101101
check_language(Swift)
102102
if(CMAKE_Swift_COMPILER)
103+
# we are not interested in logging any Swift module used
104+
# when configuring the build system -- those are not useful
105+
# since they will not contribute to the build of the compiler itself
106+
unset(ENV{SWIFT_LOADED_MODULE_TRACE_FILE})
107+
103108
enable_language(Swift)
104109
set(DEFAULT_SWIFT_MIN_RUNTIME_VERSION "${CMAKE_Swift_COMPILER_VERSION}")
105110
else()

cmake/modules/SwiftImplicitImport.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ 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
86
"${CMAKE_Swift_COMPILER}"
97
-Xfrontend -disable-implicit-${module_name}-module-import
108
-Xfrontend -parse-stdlib

0 commit comments

Comments
 (0)