Commit graph

306 commits

Author SHA1 Message Date
Chih-Hung Hsieh
2e4fdbdda1 Do not append empty DEFAULT_TIDY_HEADER_DIRS
* Default value will be empty and not work in -header-filter.

Bug: 179530304
Test: make with WITH_TIDY=1 and various setting of DEFAULT_TIDY_HEADER_DIRS
Change-Id: I3f784f545acd12285a5bf6dcae1bab42c9185fe7
2021-02-11 22:36:04 -08:00
Elliott Hughes
f71c05a8e5 Remove unused mips workarounds.
This was never really finished, and hasn't been supported for years.

Test: treehugger
Change-Id: I7668088d1449f33025aaf36fae0817894c84a877
2020-03-06 16:46:59 -08:00
Dan Willemsen
f264690860 Remove support for building Windows modules in Make
These now must be defined in Android.bp files.

Bug: 122618577
Test: compare build-aosp_arm.ninja before/after
Test: codesearch for LOCAL_MODULE_HOST_OS.*windows
Change-Id: I14451c7753299692940e026f85687b4c3331bb07
2019-02-05 00:19:41 -08:00
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
Logan Chien
0e53d887d6 Add prebuilt ELF binaries checker
This commit introduces a prebuilt ELF binaries checker.  The checker
will check:

1. Whether all DT_NEEDED shared libraries are specified in
   `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES` (Android.mk).

2. Whether all undefined symbols in the prebuilt binary can be resolved
   to defined symbols exported by its dependencies.

This ensures that prebuilt binaries won't silently become ABI
incompatible.

To check the prebuilt binaries, all of the dependencies must be
specified in `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES`
(Android.mk).

If your prebuilt binaries cannot be checked for some reason, you may add
the following property to Android.bp:

    check_elf_files: false,

Or, add the following setting to Android.mk:

    LOCAL_CHECK_ELF_FILES := false

Bug: 119084334
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I523d3083f22fd4053c096d26f61f8375800281c8
2019-01-21 21:35:01 +08:00
Yi Kong
f41d24acb3 Merge changes I52805f5d,Ifb16ed87
* changes:
  Allow projects to exclude from libcrt_builtins
  Move libgcc to libcrt.builtins
2018-11-13 21:56:47 +00:00
Yi Kong
65e4560308 Always get target llvm rtlib from Linux toolchain directory
To avoid duplication, we would only ship one copy of the target llvm
runtime library. Change the source path to Linux on Darwin host.

Test: m checkbuild
Bug: 119288831
Bug: 119270185
Change-Id: Ie32d65d6647765a5060078cc61a089e5a47c3a36
2018-11-12 17:38:00 +00:00
Yi Kong
8d3c6cda21 LLVM_RTLIB_PATH should not hard code linux
The path is incorrect on Darwin. Changed to use $(HOST_OS) instead.

Fixes Darwin build.

Bug: 29275768
Test: Forrest
Change-Id: I164306ad2237bce86baf37d3291622a709bfe8f3
2018-11-08 23:26:20 +00: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
Dan Willemsen
b93d898312 Remove obsolete (CLANG|LLVM)_TBLGEN
The last users have been removed.

Test: treehugger
Change-Id: Iafbf5228020bad26e1c241d46473ec559920b2fb
2018-11-01 00:24:44 -07:00
Chih-Hung Hsieh
be5dd2023e Filter out unknown arguments with clang-tidy.sh.
* Call clang-tidy.sh defined in PATH_TO_CLANG_TIDY_SHELL.
* Add dependency to clang-tidy and clang-tidy.sh.

Bug: 110538415
Test: build with WITH_TIDY=1
Change-Id: I90175ea1489272d8d4fc0f9ba4e5bbfdc7399d82
2018-08-28 09:45:39 -07:00
Chih-Hung Hsieh
4275dcf866 Define CLANG_TIDY_UNKNOWN_CFLAGS in tidy.mk
* Moved from build/soong because the list is used only in make rules.

Bug: 111885396
Test: build with WITH_TIDY=1
Change-Id: I6ca7420e7ed1e342a5b92996724c6659a406d5ae
2018-08-22 09:21:53 -07:00
Dan Willemsen
e303480584 Remove LOCAL_CLANG := false support
Only clang is supported now.

Test: build/soong/build_test.bash in all downstream branches
Change-Id: Ie8ad009625ddd7d5c38a6276b631bc889974fda3
2018-07-24 04:44:09 +00:00
Sharif Elcott
b71c33fbdc Added Address Sanitizer clang config for x86_64.
Without this, binaries built for an x64 target with Address Sanitizer enabled
fail to execute at runtime, failing with the error message "No such file or
directory".

Test: 1) Build any Android target that has asan enabled, such as statsd, on
any lunch target with suffix "_x86_64-eng". 2) Run 'file' on the generated
executable. 3) You should see "interpreter /system/bin/linker_asan64" rather
than "interpreter --gc-sections"

Bug: 111667639

Change-Id: I5d7e7f307d954d4cd48ff88a7d9d6a5732276296
2018-07-20 16:10:51 +09:00
Chih-Hung Hsieh
7ed0db8d1d Remove core/clang/versions.mk and scan-build wrapper
* Use the definitions of ClangDefaultBase and ClangDefaultVersion
  in build/soong/cc/config/global.go.
* scan-build is too old;
  replaced by better clang-tidy's -clang-analyzer-* checks.
* WITH_STATIC_ANALYZER is still effective
  to invoke ccc-analyzer or c++-analyzer.

Test: make checkbuild
Change-Id: Ifd159dd28e529d5d3c9807f5e391911365da8cdb
2018-02-15 13:38:50 -08:00
Yi Kong
cbcf11cba0 Compiler-rt libraries now use i386 instead of i686
Since Clang-4579689, crt libraries use i386 instead of i686. Update the
hardcoded paths to the new names.

Bug: 72942266
Test: N/A
Change-Id: I24f8f5742ac2fecd374fdaa3be8a11f410d31cbf
2018-02-08 14:08:44 +08:00
Yi Kong
421733f693 Switch to clang-4579689.
Bug: 68397894
Test: http://go/clang-4523590-testing
Change-Id: Id3fbac182869e92ab9b7d27d63d9f28c565c7b08
2018-02-01 10:24:04 -08:00
Stephen Hines
b6415a9e33 Switch to clang-4393122.
Bug: http://b/62580008
Test: https://goto.google.com/clang-4393122-testing
Change-Id: I287bd58cb522ac78285da4778818133022b2abc8
2017-10-13 14:21:40 -07:00
Dmitry Shmidt
800604dc37 Merge "clang: Allow LOCAL_CLANG exception for device/google/contexthub project"
am: 138c7baabe

Change-Id: I5f821a275c744796f654242c05caeea44691f0e3
2017-08-03 16:39:37 +00:00
Dmitry Shmidt
795bed9329 clang: Allow LOCAL_CLANG exception for device/google/contexthub project
It is built by non-eabi gcc

Bug: 35666637
Test: Manual

Change-Id: I10b4364b66f6cad907b1271250506500aeb11fd5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-08-01 15:48:03 -07:00
Chih-hung Hsieh
877a7a43d2 Merge "Add OWNERS in build/make" am: d79ce64555
am: 9af11fce7a

Change-Id: I44e3689a9280de474055ec4f109278ef2ff7d8cf
2017-06-22 04:34:38 +00:00
Chih-Hung Hsieh
044fc0c4a4 Add OWNERS in build/make
* Owners are selected from top CL approvals or owners.
  They will be suggested to review/approve future CLs.
* OWNERS files are recognized by the new find-owners plugin, see .md files in
  https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/

Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: Ibe6765e5448c471ca413413e3d052507ccee4ea6
2017-06-21 16:09:56 -07:00
Yi Kong
46ba92a0d9 Merge "Switch to clang-4053586" am: 1923ed7f41 am: 7315435dce
am: 1eb2339708

Change-Id: I70feed0bb65455848faf7accdf18a4becb4c25ed
2017-06-06 21:26:11 +00:00
Yi Kong
dd65f96c3d Switch to clang-4053586
Bug: 37423073
Test: Build on multiple devices
Change-Id: Ic1a5f515db66275ee96fb6a614ffbb719bb91859
2017-06-02 22:13:01 -07:00
Stephen Hines
a519f4aef2 Merge "Switch to clang-3859424." am: af077e293b am: 2e51c40eca
am: 55b63f7a4b

Change-Id: I6217cced01c6942e5a9f4eaea681d3727e197592
2017-03-31 05:00:38 +00:00
Stephen Hines
073ab0a707 Switch to clang-3859424.
Bug: http://b/36442361
Test: Build and run multiple devices/targets.
Change-Id: I161003f07982b1794ef5f1d1d61a48ddf45f6ab3
2017-03-28 22:11:52 -07:00
Ed Tam
fa8d823f7c Add partner vendor projects to clang exception list
Bug: 36402040

Test: Built partner target in aosp branch with same change
Change-Id: I23cd948606bd26d2ec96281993ec6991027ba1b7
Signed-off-by: Ed Tam <etam@google.com>
2017-03-21 12:26:44 -07:00
Jayant Chowdhary
b62ae5634a Merge "Add RenderScript Toolchain information to Soong." am: 9b49502b95 am: 14316678df am: 9e3ad408bc
am: 2dd9441b18

Change-Id: Ibd39b2ac660cfdd29c80efa58261612423579e04
2017-02-08 19:27:41 +00:00
Jayant Chowdhary
8c3c9b5ec2 Add RenderScript Toolchain information to Soong.
Test: make -j64 from top of the tree.

Change-Id: I230f8d1265a71344bba8883ee9bdf2de98fcd41f
2017-02-02 19:35:58 -08:00
Stephen Hines
9b6e5a351c Merge "Switch to clang-3688880." am: d12816b100 am: 627565d961 am: 0341eb0a7c
am: 635dfdc07a

Change-Id: Ib7e62abfa67188ab881580502c67016493512132
2017-02-01 21:37:34 +00:00
Stephen Hines
40038d8451 Switch to clang-3688880.
Bug: http://b/31532493
Test: Manual validation.
Change-Id: I7c415a1008c368a4b65bac2b5cd3ded3f4bb9de0
2017-01-31 12:12:55 -08:00
Chih-Hung Hsieh
904ed93daf Merge "Put back LLVM_PREBUILTS_BASE." am: c921add339 am: 3dadeece2a am: 9d581bbcdb
am: 478210f500

Change-Id: I90c78974817f5452815989ef584d30d83e17af49
2017-01-26 20:31:50 +00:00
Chih-Hung Hsieh
614b3a52ea Put back LLVM_PREBUILTS_BASE.
Without this, WITH_TIDY is disabled because
PATH_TO_CLANG_TIDY uses LLVM_PREBUILTS_BASE.

Test: build with WITH_TIDY=1
Change-Id: I607ae45550f4574b3cee8e91c3d5b7eaa5f0a96c
2017-01-26 10:23:54 -08:00
Brian Carlstrom
df2e417b93 Merge "Revert "Switch to clang-3625443."" am: 4932b9fb59 am: a7a3e4719d am: 52005b072d
am: a439927293

Change-Id: I5a68d9558e7144cf70387963b480eb876ceec5ac
2017-01-26 08:19:14 +00:00
Stephen Hines
0425d52cde Revert "Switch to clang-3625443."
This reverts commit 296af27303.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I524c2c89004c79352bf2be3727c7ddcceca9b2e7
2017-01-26 07:59:53 +00:00
Stephen Hines
3c8f892128 Merge "Switch to clang-3625443." am: 296c345be9 am: 7c88a2f902 am: 2b711fb78f
am: 0d0d2ee04a

Change-Id: I243ec2266123da5c7d46f51c0608789740430cbb
2017-01-26 07:35:29 +00:00
Stephen Hines
296af27303 Switch to clang-3625443.
Bug: http://b/31532493
Test: Manual validation.
Change-Id: I0490b60c996052669fbfd545d7c3eed17fdd3547
2017-01-23 15:03:55 -08:00
Dan Willemsen
86632061d5 Merge "Remove variables exported by Soong" am: f61205d5c7 am: da8f49522d am: 4f1d1d0a1e
am: 24e2ce2dc8

Change-Id: Ife25e2a3b8441b497060d8a2ad211b4f21d328ea
2016-12-15 07:56:55 +00:00
Dan Willemsen
56c6a9d1ff Remove variables exported by Soong
LLVM_RELEASE_VERSION is unused from envsetup.sh and during product
config loading.  LLVM_PREBUILTS_VERSION is still used in envsetup.sh, so
needs to stay.

Delay reading core/clang/config.mk until after Soong's variables are
read so that we don't need a copy of LLVM_PREBUILTS_BASE.

Test: Compare build-aosp_flounder.ninja
Change-Id: I85b5836a2230838c8f3766fb19c6108fc5c9ca50
2016-12-14 16:27:08 -08:00
Dan Willemsen
d014113e55 Merge "Remove configuration exported from Soong" am: b1e0c2c478 am: c70f550338 am: 9e7c127da2
am: 2871f632be

Change-Id: I06f1dfa468a266291fbf47a149876e80bea61cbe
2016-11-01 17:38:46 +00:00
Dan Willemsen
425130e958 Remove configuration exported from Soong
Bug: 32244182
Test: build-aosp_angler.ninja is identical before/after (with same env)
Change-Id: Iec2784d1ec5301afe4e2de491dee806551ae3764
2016-10-31 15:48:00 -07:00
Pirama Arumuga Nainar
935357e844 Merge "RenderScript-specific build updates for LLVM rebase" am: 9e73fb6332 am: 97f259ec41 am: 9570b53f9c
am: 9ae3b219ca

Change-Id: I2e7a9f802b8e30bcff4956103a8a4602d5009281
2016-10-26 18:16:58 +00: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
Chih-hung Hsieh
2ca2893374 Merge "Remove valgrind from the exception list." am: 461a15d0d9 am: c9f8b3faeb
am: 10620907bb

Change-Id: Ia7cc483872b547e4d56ebfd2f124004b371e962d
2016-10-21 05:36:41 +00:00
Chih-hung Hsieh
461a15d0d9 Merge "Remove valgrind from the exception list." 2016-10-21 05:05:30 +00:00
Dan Willemsen
e286402da6 Merge "Remove variables exported by Soong" am: 4e5df99720 am: 662c90bc11
am: f4993d136f

Change-Id: Ia326a5a292b76400bee3e5317bdc3ecc00e62ce2
2016-10-21 01:38:26 +00:00
Dan Willemsen
db3bfcea66 Remove variables exported by Soong
These are all variables that we export from Soong, and are only used
after Soong's make_vars.mk is read.

Test: Compare build-aosp_flounder.ninja before/after -- only whitespace
Change-Id: Ibb6c6d7bc00ff5840a72c2bba5d97ac4b4724df3
2016-10-18 17:26:07 -07:00
Chih-Hung Hsieh
2ce51fc365 Remove valgrind from the exception list.
Now valgrind is built with clang/llvm for
the host and all supported targets.

Bug: 28454823
Test: build
Change-Id: Icb4bb7626a79aa309cec2b396cbd8f155895c901
2016-10-11 15:36:04 -07:00
Chih-hung Hsieh
9b9246c58d Merge "Accept environment variables DEFAULT_*_TIDY_CHECKS" am: 4b4b2da13d am: 8d4da5f521 am: 8a81b9c5a0
am: 7db63a8293

Change-Id: I1b29a147c95deb74283c16362af0ac72714b7c97
2016-10-04 22:37:21 +00:00
Chih-hung Hsieh
4b4b2da13d Merge "Accept environment variables DEFAULT_*_TIDY_CHECKS" 2016-10-04 22:25:26 +00:00