Build crtbegin with clang too.
If _start_main is static, clang optimizes it out and then generates an
undefined reference from the inline assembler, so let's explicitly tell
the compiler it's used.
Bug: N/A
Test: ran tests
Change-Id: Iba3d9c63abae9a0dc32f236b01783515f0190956
diff --git a/libc/Android.bp b/libc/Android.bp
index 842dae4..53d7d5e 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -42,6 +42,7 @@
"-Wextra",
"-Wunused",
"-Wno-deprecated-declarations",
+ "-Wno-gcc-compat",
"-Wframe-larger-than=2048",
// Try to catch typical 32-bit assumptions that break with 64-bit pointers.
@@ -1912,7 +1913,7 @@
local_include_dirs: ["arch-x86_64/include"],
},
},
- clang: false,
+ clang: true,
}
cc_defaults {