Commit graph

19 commits

Author SHA1 Message Date
Logan Chien
c6d2cf86d1 Fix linker_asan[64] apex bootstrap build error
This commit fixes `linker_asan[64]` apex bootstrap build errors.
Without this change, `make -j SANITIZE_TARGET=address` results in:

  FAILED: ninja: 'out/target/product/walleye/system/bin/linker_asan64',
  needed by 'out/target/product/walleye/system/bin/app_process64',
  missing and no known rule to make it

Test: lunch aosp_walleye-userdebug && make SANITIZE_TARGET=address
Change-Id: I980a36499cd327db307321fc8e4548925e7d56bf
2019-01-31 17:07:50 +08:00
Yi Kong
95fd9d171d Move libgcc to libcrt.builtins
libgcc is kept behind libcrt.builtins to provide unwinder symbols and
any other missing symbols.

Bug: 29275768
Bug: 119007754
Test: m checkbuild
Change-Id: Ifb16ed87afc3391f8830d771971315515f929235
Merged-In: Ifb16ed87afc3391f8830d771971315515f929235
(cherry picked from commit b9d8932279)
2018-11-08 13:40:34 -08:00
Pirama Arumuga Nainar
08df240f94 RenderScript-specific build updates for LLVM rebase
Bug: http://b/31320715

Use LLVM's RenderScript triples: upstream LLVM now has 32-bit and
64-bit RenderScript triples.  Update RS_TRIPLE build variables to use
the new triples.

Switch prebuilt clang used for building RenderScript runtime library to
the latest prebuilts.

Test: Run RenderScript tests (slang, bcc host tests, RsTest, CTS)

Change-Id: I308f6a2183350cfc380228a1eed07ec118d93a46
2016-10-25 09:35:26 -07:00
Dan Willemsen
056609ccfe Remove unnecessary variables
These are all either recently unused due to the removal of CFLAGS/etc,
or have been exported by Soong and are no longer necessary.

Change-Id: I5930d43fda21acc8202b3d8ea010fbefb6ae4cf1
2016-05-25 21:23:20 -07:00
Dan Willemsen
02268f01df Move to a single clang unknown flags list
Soong is using a single list of unknown clang flags for all
architectures, instead of the per-architecture list here. Collapse this
down to a single list as well so that it can be verified against the
Soong list, and eventually replaced by the Soong version.

Change-Id: If43cd892105da5155907c05965a74b835920a369
2016-05-19 15:33:54 -07:00
Dan Willemsen
174feb906f Remove (C|CPP|CONLY|LD)FLAGS checked by Soong
At the beginning of every build, Soong has exported its version of these
variables, and has been ensuring that when sorted, the result is the
same. So these variables all have the same flags of the Soong ones, but
may be in different orders. We don't believe any of the remaining order
differences matter. As we remove the Make definitions, the exported
Soong variables will take over.

This only removes lines that change one of these variables:

  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_LDFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_LDFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_LDFLAGS

Many other variables are unnecessary now too, but those will be removed
in another change. For those we can ensure the build.ninja file does not
change, but we expect it to change here due to the ordering differences.

Change-Id: I0bd0778706d02ee27b2784dd8dc6b2c71d37bd3a
2016-05-18 18:10:04 -07:00
Evgenii Stepanov
bbd944a25d Remove RPATH for AddressSanitizer.
RPATH was used in order for ASan executables to prefer ASan libraries
under /data. Now ASan executables use a special loader (linker_asan),
which implements this logic. RPATH is no longer needed.

Change-Id: Ic7a39b022267b80bd0ce3e95a2e822eb308a1fba
2015-12-21 10:29:54 -08:00
Stephen Hines
bf45029dc4 Rename AArch64 ASan target runtime library to match upstream convention.
Rename from
 libclang_rt.asan-arm64-android.so
to
 libclang_rt.asan-aarch64-android.so

Change-Id: I6d73f458f437440c1de5bc72d2188d392c80cb98
2015-11-18 22:13:16 -08:00
Evgenii Stepanov
8f5e67a98c Use a different linker for ASan binaries.
Another change in bionic/linker adds linker_asan/linker_asan64 that
know where to find ASan shared libraries.
Also, include linker_asan to the required packages list when building
for ASan.

Change-Id: I8ebe7c0091bbeb0c135708a891d33d9844373d37
2015-07-14 11:10:40 -07:00
Evgenii Stepanov
bf140974b2 Move sanitized vendor libraries to /data/vendor/lib(|64).
Sanitized RPATH now mentions /system/vendor/lib to preserve overlay
in the case when a sanitized version of a vendor library can not be
built.

Bug: 22199458
Change-Id: I3222d2e1d6c08fdd1e0404fcb7db347aa4a92bb7
2015-06-30 14:04:45 -07:00
Evgenii Stepanov
4d3d4141ae With SANITIZE_TARGET, move shared libraries to /data.
A fully (or even mostly) asan-instrumented device will have 2 copies of each
shared library, which might not fit on system partition. Moving instrumented
libraries to /data.

Bug: 21785137
Change-Id: I64184261da2eb24a1382c67e4931c34a5a38b3c0
2015-06-19 11:15:50 -07:00
Evgenii Stepanov
f0b15e173b Fix AddressSanitizer link order and multilib setup.
ASan runtime library (when using dynamic linking) must be the first
dependency of the main executable to achieve correct symbol
interposition. This matches how the clang driver works.

In multilib setup, ASan-RT name depends on the target arch:
  /system/lib/libclang_rt.asan-arm-android.so
  /system/lib64/libclang_rt.asan-arm64-android.so

We also set RPATH to /system/lib/asan or /system/lib64/asan
to have a place for ASan-only versions of system libraries.

Change-Id: I5c0cdb89e5e08a1950eb276e406da9f31a6e52dd
2015-04-27 14:48:35 -07:00
Dan Albert
343ed674e3 Use prebuilt libclang_rt.profile.
Bug: 17574078
Change-Id: I4838cd5d125a0b2bf76aad2fdaef1ee3122687e8
2015-04-01 19:03:22 -07:00
Stephen Hines
1568029218 Add more support for GLOBAL_CONLYFLAGS.
This will be necessary to support -std=gnu99 mode for clang 3.6, which
defaults to C11 mode (unlike prior releases that use C99).

Change-Id: Iea84582f9f12ba76b988463cbc0a20bd61042538
2014-12-01 15:36:26 -08:00
Stephen Hines
5c72544d48 Fix build breakage due to incorrect bcc_compat RS_TRIPLE.
Bug: 17333374
Change-Id: I13582ce0cde86f7b3728aa4f45a5197438d65a2d
(cherry picked from commit 52626d2a7b)
2014-09-02 21:46:25 -07:00
Stephen Hines
039675adb8 Fix RS_TRIPLE and RS_TRIPLE_CFLAGS.
Bug: 17333374

Add RS_TRIPLE_CFLAGS to ensure that we build with the proper defines on
targets like x86. This also changes all build targets to use the
proper 32/64-bit triples when creating their runtime libraries.

Change-Id: I8f6175b1a14af6d03ee90f32069f3688ec227fb9
2014-08-29 15:20:05 -07:00
Ying Wang
ed56902c29 Remove arm64 clang build warning
Now we have enabled arm64 clang.
This change remvoed arm64 clang build warning and cleaned the
arm64 unknow c flags.

Change-Id: Ia583a78c6d364e603ff09df423aa34a6e03d0b9b
2014-03-18 15:58:13 -07:00
Tim Murray
b5f333bbef Work in progress to enable build system support for Clang.
Change-Id: I278b48bcd976afcbde8d86261da9b9b9efc9002c
2014-03-14 00:39:03 -07:00
Ying Wang
1f9828387d Refactor llvm_config.mk and support the 2nd arch
1. Following the setup of gcc in build/core/combo/,
we added the [HOST|TARGET]_<arch>.mk clang config files,
and load only the configs needed by the current product.
2. Added support for the 2nd arch.

Change-Id: I2a383418a9688a050b39492f8e489d40eeeb5f2d
2014-02-07 09:11:22 -08:00