summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-08-01 16:28:06 -0700
committerReid Kleckner <rnk@google.com>2019-08-01 16:28:06 -0700
commitda0dcccc44f11809d1241fcd52b4c0e25146d2a2 (patch)
tree0b8a15696f2e9c8a7acab11c24d874112a8abf4f
parentf564874f49556d930882645a348fcd6ddc6847b0 (diff)
downloadnasm-da0dcccc44f11809d1241fcd52b4c0e25146d2a2.tar.gz
Skip compiling ilog2.c on Windows where 'inline' uses C++ semantics
Providing definitions for the ilog2 inline functions in a separate .c file is not necessary and causes link errors if the compiler chooses not to inline. Bug: 989745 Change-Id: I0911d02e9601395a235e4a70787087844f8d5ba1
-rw-r--r--BUILD.gn6
1 files changed, 6 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index dd52d884..8cb1af7d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -95,6 +95,12 @@ if (current_toolchain == host_toolchain) {
"config/msvc.h",
]
+ # On Windows, inline functions do not require out of line definitions.
+ # crbug.com/989745
+ if (is_win) {
+ sources -= [ "nasmlib/ilog2.c" ]
+ }
+
configs -= configs_to_delete
configs += configs_to_add
configs += [ ":nasm_config" ]