diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn --- a/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn @@ -24,7 +24,7 @@ "-fPIC", "-fno-builtin", ] - if (target_os != "android") { + if (current_os != "android") { cflags += [ "-fvisibility=hidden" ] } if (!is_debug) { @@ -164,7 +164,7 @@ "gcc_personality_v0.c", ] - if (target_os != "fuchsia") { + if (current_os != "fuchsia") { sources += [ "emutls.c", "enable_execute_stack.c", @@ -172,7 +172,7 @@ ] } - if (target_os != "fuchsia" && !compiler_rt_baremetal_build) { + if (current_os != "fuchsia" && !compiler_rt_baremetal_build) { sources += [ # This comment prevents `gn format` from putting the file on the same line # as `sources +=`, for sync_source_lists_from_cmake.py. @@ -180,7 +180,7 @@ ] } - if (target_os == "mac") { + if (current_os == "mac") { sources += [ "atomic_flag_clear.c", "atomic_flag_clear_explicit.c", @@ -191,7 +191,7 @@ ] } - if ((target_cpu == "x64" && target_os != "win") || target_cpu == "arm64") { + if ((current_cpu == "x64" && current_os != "win") || current_cpu == "arm64") { # GENERIC_TF_SOURCES sources += [ "comparetf2.c", @@ -215,7 +215,7 @@ ] } - if (target_cpu == "x86" || target_cpu == "x64") { + if (current_cpu == "x86" || current_cpu == "x64") { sources += [ "cpu_model.c", "divxc3.c", @@ -232,7 +232,7 @@ "powixf2.c", ] } - if (target_cpu == "x86") { + if (current_cpu == "x86") { sources -= [ "ashldi3.c", "ashrdi3.c", @@ -265,13 +265,13 @@ "i386/udivdi3.S", "i386/umoddi3.S", ] - if (target_os == "win") { + if (current_os == "win") { sources += [ "i386/chkstk.S", "i386/chkstk2.S", ] } - } else if (target_cpu == "x64") { + } else if (current_cpu == "x64") { sources -= [ "floatdidf.c", "floatdisf.c", @@ -288,7 +288,7 @@ "x86_64/floatundisf.S", "x86_64/floatundixf.S", ] - if (target_os == "win") { + if (current_os == "win") { sources += [ "x86_64/chkstk.S", "x86_64/chkstk2.S", @@ -296,8 +296,8 @@ } } - if (target_cpu == "arm") { - if (target_os != "mingw") { + if (current_cpu == "arm") { + if (current_os != "mingw") { sources -= [ "bswapdi2.c", "bswapsi2.c", @@ -357,13 +357,13 @@ } } - if (target_cpu == "arm64") { + if (current_cpu == "arm64") { sources += [ # This comment prevents `gn format` from putting the file on the same line # as `sources +=`, for sync_source_lists_from_cmake.py. "aarch64/fp_mode.c", ] - if (target_os == "mingw") { + if (current_os == "mingw") { sources += [ # This comment prevents `gn format` from putting the file on the same # line as `sources +=`, for sync_source_lists_from_cmake.py. @@ -372,7 +372,7 @@ } } - if (target_cpu == "hexagon") { + if (current_cpu == "hexagon") { sources += [ "hexagon/common_entry_exit_abi1.S", "hexagon/common_entry_exit_abi2.S", @@ -407,7 +407,7 @@ ] } - if (target_cpu == "ppc64") { + if (current_cpu == "ppc64") { sources += [ "ppc/divtc3.c", "ppc/fixtfdi.c", @@ -424,7 +424,7 @@ ] } - if (target_cpu == "riscv") { + if (current_cpu == "riscv") { sources += [ # This comment prevents `gn format` from putting the file on the same line # as `sources +=`, for sync_source_lists_from_cmake.py. diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn --- a/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn @@ -12,7 +12,7 @@ configs -= [ "//llvm/utils/gn/build:thin_archive" ] cflags = [] - if (target_os != "win") { + if (current_os != "win") { cflags = [ "-fPIC", "-Wno-pedantic", @@ -47,14 +47,14 @@ "InstrProfilingValue.c", "InstrProfilingWriter.c", ] - if (target_os == "win") { + if (current_os == "win") { sources += [ "WindowsMMap.c", "WindowsMMap.h", ] } - if (target_os != "win") { + if (current_os != "win") { defines = [ "COMPILER_RT_TARGET_HAS_ATOMICS", "COMPILER_RT_TARGET_HAS_FCNTL_LCK",