Commit Graph

297 Commits

Author SHA1 Message Date
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
Chih-Hung Hsieh 8fdda6e495 Accept environment variables DEFAULT_*_TIDY_CHECKS
* Define DEFAULT_GLOBAL_TIDY_CHECKS/DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS
  only if it is not already defined.

Bug: http://b/27779618
Test: build with WITH_TIDY=1 and define those variables.
Change-Id: I201c9da3769d6ef658a75d4a1bf42ec6816d4069
2016-10-04 10:18:02 -07:00
Chih-Hung Hsieh f3ae1a441e Merge "Use DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS for vendor/google_devices" am: 3d38042a00 am: c3118d2cd2 am: 2a9f96a1ee
am: 80d9efd0a3

Change-Id: I47140fc6faba804ff2a943a5b67d6d7217e05b25
2016-10-01 00:36:03 +00:00
Chih-Hung Hsieh 10efc73c06 Use DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS for vendor/google_devices
Many source files under vendor/google_devices
are old third party code with too many clang-tidy
misc-macro-parentheses warnings.

Test: build with WITH_TIDY=1
Change-Id: I79248af3ece9c7a4436b8cf5e6c25f224fd8201b
2016-09-30 14:50:43 -07:00
Stephen Hines 83dd356704 Merge "Switch to using clang-3289846." am: 7ec2a39c3f am: 523543b17c am: f01330d8df
am: 6ac9550c6a

Change-Id: I4159bec7fd9bb68d4d7f266d098c9fca17130fcd
2016-09-29 03:28:40 +00:00
Stephen Hines 183b142ac9 Switch to using clang-3289846.
Bug: http://b/30252254
Test: Built/boot platform using latest prebuilts.
Change-Id: I7c9357a99afec323fd766e93b5d5e941e9e06244
2016-09-28 08:51:55 -07:00
Dan Willemsen a802bf5714 Merge "Remove spaces from DEFAULT_TIDY_HEADER_DIRS" am: f69e48b30b am: 785d69a849 am: b4b610278b
am: 28666571b4

Change-Id: Ia50c9f7b042e8494ec2a4509159a5591949e5a11
2016-09-27 01:31:24 +00:00
Dan Willemsen 69811f89d6 Remove spaces from DEFAULT_TIDY_HEADER_DIRS
I'm preparing to move this to Soong, and it's simpler to compare if the
spaces are removed here (to match the other lists in this file).

Test: WITH_TIDY=true; compare build.ninja before and after change
Change-Id: Ib27a19a36ebb1132300a8c1eeace1202685dfc4c
2016-09-26 16:02:15 -07:00
Chih-hung Hsieh 6afe656b6d Merge "Define DEFAULT_TIDY_HEADER_DIRS." am: 9d66e2c2ef am: 84be3dc50a am: 59ac695071
am: e28fd9f2e4

Change-Id: I40f077e04438e2b3c54887d82a782af460304aa3
2016-09-08 20:42:34 +00:00
Chih-hung Hsieh 9d66e2c2ef Merge "Define DEFAULT_TIDY_HEADER_DIRS." 2016-09-08 20:24:07 +00:00