Skip to content

Commit d357add

Browse files
committed
[SYCL] workaround for memory consumption issue
Signed-off-by: Vladimir Lazarev <[email protected]>
1 parent 42f2a1d commit d357add

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

clang/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,14 @@ set(ENABLE_X86_RELAX_RELOCATIONS OFF CACHE BOOL
237237
set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER FALSE CACHE BOOL
238238
"Enable the experimental new pass manager by default.")
239239

240-
set(CLANG_SPAWN_CC1 OFF CACHE BOOL
240+
# Clang tool executes cc1 commands in the same process after b4a99a0
241+
# It causes increasing memory consumption for compilations where several
242+
# source files are passed (for C++ application) or several build steps (e.g.
243+
# for SYCL application we have host, device and integration header step
244+
# per source file). Memory is not freed for all cc1 commands until end
245+
# This change forces clang driver use old behavior untill memory issue
246+
# is fixed.
247+
set(CLANG_SPAWN_CC1 ON CACHE BOOL
241248
"Whether clang should use a new process for the CC1 invocation")
242249

243250
# TODO: verify the values against LangStandards.def?

0 commit comments

Comments
 (0)