Remove empty_main from non-clang builds
It's currently broken for sanitizer builds.
This is purely used to test gcc flags.
Bug: 1298356
Change-Id: If8a030d50c755a2408ef44dd992dd55076e4fad9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3472347
Auto-Submit: Arthur Eubanks <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: Ben Pastene <[email protected]>
Commit-Queue: Ben Pastene <[email protected]>
Cr-Commit-Position: refs/heads/main@{#972632}
diff --git a/BUILD.gn b/BUILD.gn
index 9cd2ebb..fae950df 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -501,8 +501,10 @@
"//net:quic_server",
"//sandbox/linux:chrome_sandbox",
"//sandbox/linux:sandbox_linux_unittests",
- "//testing:empty_main",
]
+ if (!is_clang) {
+ deps += [ "//testing:empty_main" ]
+ }
if (use_dbus) {
deps += [
diff --git a/testing/BUILD.gn b/testing/BUILD.gn
index c2df225..f95edec2 100644
--- a/testing/BUILD.gn
+++ b/testing/BUILD.gn
@@ -5,16 +5,18 @@
import("//build/config/python.gni")
# Used by linux-gcc-rel to ensure gcc doesn't choke on clang-only flags.
-executable("empty_main") {
- sources = [ "empty_main.cc" ]
+if (!is_clang) {
+ executable("empty_main") {
+ sources = [ "empty_main.cc" ]
- # The bot should only check that an empty file builds fine with gcc.
- # There's no need to check that libc++ builds with a (possibly very old)
- # version of gcc.
- # No need to remove "//build/config/compiler:runtime_library" from configs
- # (to remove its subconfig "//build/config/c++:runtime_library") since
- # empty_main.cc does not include any headers.
- no_default_deps = true
+ # The bot should only check that an empty file builds fine with gcc.
+ # There's no need to check that libc++ builds with a (possibly very old)
+ # version of gcc.
+ # No need to remove "//build/config/compiler:runtime_library" from configs
+ # (to remove its subconfig "//build/config/c++:runtime_library") since
+ # empty_main.cc does not include any headers.
+ no_default_deps = true
+ }
}
# Targets needed for isolate script to execute.