From d4071b2777f372719c752a0fea560b7bf7319e5b Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 7 Sep 2021 16:58:57 -0400 Subject: [PATCH] [gn build] Try to fix win build after cfe02847496b856aa --- llvm/utils/gn/build/BUILD.gn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn index 9ceed1d8ef85..bbd7a16b2a68 100644 --- a/llvm/utils/gn/build/BUILD.gn +++ b/llvm/utils/gn/build/BUILD.gn @@ -41,6 +41,7 @@ config("compiler_defaults") { asmflags = target_flags cflags = target_flags + cflags_cc = [] ldflags = target_flags + target_ldflags # Mostly for compiler-rt, see compiler-rt/cmake/config-ix.cmake @@ -86,7 +87,7 @@ config("compiler_defaults") { if (use_lld) { ldflags += [ "-Wl,--color-diagnostics" ] } - cflags_cc = [ + cflags_cc += [ "-std=c++14", "-fvisibility-inlines-hidden", ] @@ -353,8 +354,9 @@ config("compiler_defaults") { } config("no_exceptions") { + cflags_cc = [] if (host_os != "win") { - cflags_cc = [ "-fno-exceptions" ] + cflags_cc += [ "-fno-exceptions" ] } cflags_objcc = cflags_cc }