Commit graph

141 commits

Author SHA1 Message Date
Yi Kong
353bdb292f Merge "Remove unneeded -Wno-expansion-to-defined flag"
am: e2025abe96

Change-Id: If7726e9e4b70134c9551dd36d54bdd14baefcc2d
2018-12-11 18:51:52 -08:00
Yi Kong
4603b9f411 Remove unneeded -Wno-expansion-to-defined flag
Test: m checkbuild
Bug: 29823425
Change-Id: I8c9c7cc92757af20d3a3bbcebeb6360d1df91530
2018-12-10 04:55:51 -08:00
Yi Kong
10c9528557 Remove unneeded -Wno-deprecated-register flag am: 02c0ad48ba am: b8506d246e
am: a62c5ac2f1

Change-Id: I132fcfa5b629531df91e5d19334f904b724ec76e
2018-12-08 20:58:40 -08:00
Yi Kong
a62c5ac2f1 Remove unneeded -Wno-deprecated-register flag am: 02c0ad48ba
am: b8506d246e

Change-Id: I29f8ee1d895b078d2640fb7fb1603b301f8c0342
2018-12-08 20:54:36 -08:00
Yi Kong
b8506d246e Remove unneeded -Wno-deprecated-register flag
am: 02c0ad48ba

Change-Id: I129ebec38b7d8c99d72affb3ea0a97cfaaefd7e7
2018-12-08 20:50:34 -08:00
Yi Kong
02c0ad48ba Remove unneeded -Wno-deprecated-register flag
Test: m checkbuild
Change-Id: I030a66b8a484673caf3a96a844dc26954e08071a
2018-12-09 04:41:38 +00:00
Yi Kong
b57fd16dbd Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag"" am: 4a7400be79 am: 11c39a728a
am: e05613dd70

Change-Id: Ic296135ed6591571aedf6b31d9f3a7a2afe7632e
2018-12-07 15:20:44 -08:00
Yi Kong
e05613dd70 Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag"" am: 4a7400be79
am: 11c39a728a

Change-Id: I880489b16e51cb6e43ed94f54394ae403a0e4fea
2018-12-07 15:16:29 -08:00
Yi Kong
11c39a728a Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag""
am: 4a7400be79

Change-Id: I5bce78df06270134ebf3f9ac00b176f1fd80304e
2018-12-07 15:12:26 -08:00
Yi Kong
bca848a420 Merge "Remove unneeded -Wno-dangling-field flag" am: 3412046caf am: a9d3b3a947
am: a2eae4dfe7

Change-Id: I64c0f10bb4254291ce6ed49d9c8c1232faf79137
2018-12-07 14:29:15 -08:00
Yi Kong
a2eae4dfe7 Merge "Remove unneeded -Wno-dangling-field flag" am: 3412046caf
am: a9d3b3a947

Change-Id: Ibbd5e1cff74266844feb3b3c4c02f51d00ad7d40
2018-12-07 14:25:10 -08:00
Yi Kong
a9d3b3a947 Merge "Remove unneeded -Wno-dangling-field flag"
am: 3412046caf

Change-Id: If82dad79f357ba4c59a0e24f7b15b6285051a511
2018-12-07 14:21:07 -08:00
Yi Kong
4a7400be79 Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag""
This reverts commit f993e7797d.

Build breakage fixed.

Test: m checkbuild
2018-12-07 22:00:57 +00:00
Yi Kong
d218df1b2f Remove unneeded -Wno-dangling-field flag
Test: m checkbuild
Change-Id: I4867fb80ffa901d4fef96b315cd114e6f9b82476
2018-12-06 16:43:55 -08:00
Chih-Hung Hsieh
50e09ac14f Undo workaround of flag filtering. am: 1017b37654 am: 058cd51ebb
am: 25a972280f

Change-Id: I61ced46a2177308f0830b0f5fbba82dae32b7ab0
2018-12-06 16:18:57 -08:00
Chih-Hung Hsieh
25a972280f Undo workaround of flag filtering. am: 1017b37654
am: 058cd51ebb

Change-Id: Ib5fed3a392a0e7e6f5bd25ed583ce2db1daf37ba
2018-12-06 16:11:42 -08:00
Chih-Hung Hsieh
058cd51ebb Undo workaround of flag filtering.
am: 1017b37654

Change-Id: I1645934dad7001555a2ac32e4fe17cd72aa540c4
2018-12-06 16:07:04 -08:00
Chih-Hung Hsieh
1017b37654 Undo workaround of flag filtering.
* Now header-abi-dumper does not complain about -fno-sanitize=implicit-integer-sign-change

Bug: 119558057
Test: make checkbuild
Change-Id: I80be08dd5aa184498bdbb83b42b877dbec152165
2018-12-06 12:12:41 -08:00
Martin Stjernholm
7dd9a4e841 Merge "Revert "Remove unneeded -Wno-constant-logical-operand flag"" am: 53afe27ef9 am: ae0f414646
am: 9c1fb0502d

Change-Id: I0aa94da6b150d8efc7afe43757152efd89c306df
2018-12-06 05:02:48 -08:00
Martin Stjernholm
9c1fb0502d Merge "Revert "Remove unneeded -Wno-constant-logical-operand flag"" am: 53afe27ef9
am: ae0f414646

Change-Id: Ib4fca3dc896396ff4e5af6e0894913bdcf9d0db0
2018-12-06 04:54:48 -08:00
Martin Stjernholm
ae0f414646 Merge "Revert "Remove unneeded -Wno-constant-logical-operand flag""
am: 53afe27ef9

Change-Id: Id9e853048df0ead63df11f5460289dd96aac622b
2018-12-06 04:51:37 -08:00
Martin Stjernholm
f993e7797d Revert "Remove unneeded -Wno-constant-logical-operand flag"
This reverts commit 4f0ce757aa.

Reason for revert: Breaks several targets in internal git_master, e.g. http://ab/5165971.

Test: Build failing library
Change-Id: I02a5ade05a76b24020586c55a4e8f441ca7708a9
2018-12-06 12:17:40 +00:00
Yi Kong
85ab538ef3 Merge "Remove unneeded -Wno-constant-logical-operand flag" am: a7a432fb82 am: 3c861d1b33
am: 608217f1e0

Change-Id: I611dc689333bb1a1383c920600463fc31a5393aa
2018-12-05 20:47:54 -08:00
Yi Kong
608217f1e0 Merge "Remove unneeded -Wno-constant-logical-operand flag" am: a7a432fb82
am: 3c861d1b33

Change-Id: I5a5a77ff4f3e68f34dccfe95097b9980a1954b70
2018-12-05 20:42:22 -08:00
Yi Kong
3c861d1b33 Merge "Remove unneeded -Wno-constant-logical-operand flag"
am: a7a432fb82

Change-Id: I5dcc954fc139d9ab43a1f399fefe61ce7ceef2f1
2018-12-05 20:38:17 -08:00
Yi Kong
4f0ce757aa Remove unneeded -Wno-constant-logical-operand flag
Test: m checkbuild
Change-Id: If1ec62b6d88b8260c9ec39e0d63a379e7ae573e9
2018-12-06 00:18:05 +00:00
Chih-hung Hsieh
dc19885cf3 Merge "Switch to clang-r346389." am: 89dbee61ff am: 644df40b33
am: 022595785e

Change-Id: I6a3dacb6ea2ef4758bb1c16e64c4869135240a51
2018-12-05 11:11:44 -08:00
Chih-hung Hsieh
022595785e Merge "Switch to clang-r346389." am: 89dbee61ff
am: 644df40b33

Change-Id: I929e08b8da5863abe41a814f06fb3c4400635438
2018-12-05 11:07:26 -08:00
Chih-hung Hsieh
644df40b33 Merge "Switch to clang-r346389."
am: 89dbee61ff

Change-Id: I18befe8152bb455cee18852a5b494256c0c175be
2018-12-05 10:53:03 -08:00
Chih-Hung Hsieh
3567e62f97 Switch to clang-r346389.
* Add -fno-sanitize=implicit-integer-sign-change when
  there is any integer related sanitizer, and this check
  is not explicitly specified.
  Android core does not boot with this new sanitizer yet.
* Filter out -fno-sanitize=implicit-integer-sign-change
  from tooling flags.

Bug: 119329758
Bug: 119557795
Test: make checkbuild, boot, go/clang-r346389-testing
Change-Id: I709de569cb73d070fc4958e2b4387f4041bc5438
2018-12-04 19:50:45 +00:00
Yi Kong
26a8e315f0 Merge "Revert "Revert "Remove unnecessary warning suppression""" am: 3a33fe535e am: 9d256a5aa1
am: b910379c91

Change-Id: I55f4a983fe7783a43c8b7fc1b2ada3e6e24f7fba
2018-12-04 01:57:17 -08:00
Yi Kong
b910379c91 Merge "Revert "Revert "Remove unnecessary warning suppression""" am: 3a33fe535e
am: 9d256a5aa1

Change-Id: I76bdf7af21564068168fa3cad9b3934f7d6f2bf4
2018-12-04 01:52:57 -08:00
Yi Kong
9d256a5aa1 Merge "Revert "Revert "Remove unnecessary warning suppression"""
am: 3a33fe535e

Change-Id: I81421f5340798c181c7f9b72faea5bc433bc0ed5
2018-12-04 01:47:51 -08:00
Yi Kong
734a07c66d Revert "Revert "Remove unnecessary warning suppression""
This reverts commit afedf3bdc9.

Build failure fixed.

Change-Id: I46e7e222c2b5bfa5b1846f3fe87444afb70f1b31
2018-12-04 00:42:27 +00:00
Yi Kong
a7a71847d7 Merge "Revert "Remove unnecessary warning suppression"" am: cf492adb34 am: 1e8681d22f
am: ec10bb5d51

Change-Id: Ief86ddc75dbe998596f2ec8db23cb048fe0ba4c2
2018-11-30 15:52:51 -08:00
Yi Kong
ec10bb5d51 Merge "Revert "Remove unnecessary warning suppression"" am: cf492adb34
am: 1e8681d22f

Change-Id: I2debeb50164d6c5f8d516fe66a6870d34f9dd3eb
2018-11-30 15:47:19 -08:00
Yi Kong
1e8681d22f Merge "Revert "Remove unnecessary warning suppression""
am: cf492adb34

Change-Id: If2941e0eb1a19194bce00af67e5e81aab6368286
2018-11-30 15:42:10 -08:00
Vishnu Nair
afedf3bdc9 Revert "Remove unnecessary warning suppression"
This reverts commit ee53a98e31.

Reason for revert: build break

Change-Id: I065b702d6eaa2e72d47a2b7a404fdd7fe51661c3
2018-11-30 21:01:30 +00:00
Yi Kong
f288215589 Merge "Remove unnecessary warning suppression" am: da5cf6a7f3 am: 779ec3a2dc
am: a9c6ec0c95

Change-Id: I5c3e1a83753f1c36a69d3a7895d812c44966532e
2018-11-30 12:36:32 -08:00
Yi Kong
a9c6ec0c95 Merge "Remove unnecessary warning suppression" am: da5cf6a7f3
am: 779ec3a2dc

Change-Id: I581200aa4df67c8ab7076bfbfa9b110b8c15e5ec
2018-11-30 12:05:28 -08:00
Yi Kong
779ec3a2dc Merge "Remove unnecessary warning suppression"
am: da5cf6a7f3

Change-Id: I84ae0cb712c26ff4941aaea583bfa467378292a5
2018-11-30 11:51:03 -08:00
Yi Kong
ee53a98e31 Remove unnecessary warning suppression
All instances of no-self-assign-overloaded warning have been fixed,
remove the suppression flag.

Test: m checkbuild
Change-Id: I70d9d6f721b36ebb5c3974893f79a09e4b1d1f4d
2018-11-09 23:09:19 +00:00
Yi Kong
c7e433d933 Merge "Update clang to r344140" am: 8a89f21746 am: 0d607467ec
am: e9190f2218

Change-Id: I718de03bd9b37b3a151b792ff38a7776e5cfc40e
2018-11-06 17:58:12 -08:00
Yi Kong
e9190f2218 Merge "Update clang to r344140" am: 8a89f21746
am: 0d607467ec

Change-Id: I4c39a764b677667881e301c262f6c5298990d756
2018-11-06 17:52:22 -08:00
Yi Kong
0d607467ec Merge "Update clang to r344140"
am: 8a89f21746

Change-Id: I33b83790907fb82e8cb73370dad587d51f1e504b
2018-11-06 17:48:20 -08:00
Yi Kong
53ed59ef35 Update clang to r344140
Bug: 111759196
Test: Test various targets in AOSP and internal branches.
      For Googlers, go/clang-r344140-testing
Change-Id: I70fc5a2824de698d78c95ce2acd42eff9c5ebe15
2018-11-01 23:13:25 +00:00
Chih-Hung Hsieh
53390f2557 DO NOT MERGE, Make default -Wimplicit-fallthrough as error.
Other branches might still have this warning for some build targets.

Bug: 112564944
Test: make checkbuild
Change-Id: I3db52b8a60bb28861fc9ba963a7d1cd1fe49e903
2018-10-31 18:04:22 +00:00
Chih-Hung Hsieh
d6022447f1 DO NOT MERGE, Make default -Wimplicit-fallthrough as error.
Other branches might still have this warning for some build targets.

Bug: 112564944
Test: make checkbuild
Change-Id: Ic2474aa4e09904c046714182bd90409def0e826d
2018-10-31 17:59:54 +00:00
Chih-Hung Hsieh
a07a9e0ba4 Enable global -Wimplicit-fallthrough as default error.
Bug: 112564944
Test: make checkbuild
Change-Id: Ic2474aa4e09904c046714182bd90409def0e826d
2018-10-30 09:39:42 -07:00
Peter Collingbourne
caf7f87a65 Merge "Enable safe ICF with LLD." am: 63c6361f91 am: e77fe6ac08
am: 6cfa0e453a

Change-Id: I0a67788593daef55c323c85b2e778561473c4458
2018-10-26 18:23:11 -07:00
Peter Collingbourne
486e42c353 Enable safe ICF with LLD.
Support for safe ICF was added to LLD in LLVM r337429. This reduces
the size of sailfish system.img by 7.6MB.

The address-significance tables created by Clang to support LLD's
implementation of safe ICF are incompatible with ld -r. Therefore we
need to pass -fno-addrsig to the compiler to prevent it from creating
an address-significance table when building a cc_object.

Change-Id: I83e28741e6b3cdf09566447d2658ce48594f2074
2018-10-25 13:40:28 -07:00
Logan Chien
6e7d60ef8e Merge "Remove flags from ClangLibToolingUnknownCflags" am: 0b6bcd4014 am: aceb86e345
am: 99f21f683c

Change-Id: I4e8ef3471689c4f7183f9068a0a02ec9c1ecc622
2018-10-17 03:18:48 -07:00
Logan Chien
aceb86e345 Merge "Remove flags from ClangLibToolingUnknownCflags"
am: 0b6bcd4014

Change-Id: I7f7e9e80052e748c1d92f46fee4552c1b4a45a2b
2018-10-17 03:08:54 -07:00
Logan Chien
61f2d11e75 Remove flags from ClangLibToolingUnknownCflags
This commit removes flags from ClangLibToolingUnknownCflags.  These
flags were added to workaround an old version of clang in
`external/clang`.  Since we have updated to clang-r339409b, we don't
need these workaround anymore.

Bug: 117764794
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Change-Id: Ifbeebf05df5c08ee3bb7d489f39250d8fd5f5acf
2018-10-16 17:52:12 +08:00
Chih-Hung Hsieh
be96981cd9 Merge "Add default -Wimplicit-fallthrough." am: 230e4c77a5 am: cfba3658f4
am: 20249a7a1a

Change-Id: I7ba99728d04f6b67d0b635a5173f0422ee94d802
2018-10-08 18:10:44 -07:00
Chih-Hung Hsieh
cfba3658f4 Merge "Add default -Wimplicit-fallthrough."
am: 230e4c77a5

Change-Id: I15e7cbf40722360d91cafc196e4a9a908338df56
2018-10-08 18:02:54 -07:00
Chih-Hung Hsieh
bd783f13c1 Add default -Wimplicit-fallthrough.
After we fix all existing such warnings, it can be changed to an error.

Bug: 112564944
Test: make checkbuild
Change-Id: I61ee3a24a3f992ef018cfe6c995e957416551183
2018-10-08 22:12:35 +00:00
Stephen Hines
11a5326718 Merge "Switch to clang-r339409." am: ee15f2a7c7 am: f4fe6300e6
am: 0d4428935d

Change-Id: I0e5e63749ffcb5b9ca7acb2380a6be769910211d
2018-10-01 09:41:37 -07:00
Stephen Hines
f4fe6300e6 Merge "Switch to clang-r339409."
am: ee15f2a7c7

Change-Id: Ic7de9d629900ce71315029a82f32a89a11c730be
2018-10-01 09:20:41 -07:00
Stephen Hines
c91ab9eb6d Switch to clang-r339409.
This also changes over llvm-strip to use the -o flag, rather than
relying on nonstandard (and no longer functional) positional arguments.

Bug: http://b/111998531
Test: Multiple new builds. For googlers - http://go/clang-r339409-testing
Change-Id: I8c82d06304af24a001e6552e36e2f540d8e364ce
2018-09-26 21:15:08 +00:00
Chih-Hung Hsieh
3951f37eb9 Remove flto dependent flags when -flto is removed. am: 9e88ba9f22 am: 1cc0227af2
am: e4988b18b1

Change-Id: Ia98013a21a28c1fa93e67b13eb1b32e870cb0d00
2018-08-24 13:29:02 -07:00
Chih-Hung Hsieh
1cc0227af2 Remove flto dependent flags when -flto is removed.
am: 9e88ba9f22

Change-Id: I174a627fe877f66b81ae889a82eefadff8216dc4
2018-08-24 12:53:01 -07:00
Chih-Hung Hsieh
9e88ba9f22 Remove flto dependent flags when -flto is removed.
* C++ source files could be compiled with "-fwhole-program-vtables"
  in cppflags. We need to filter out those flto dependent flags
  in flags.CppFlags and use flags.toolingCppFlags instead of
  flags.cppFlags.

Test: build with WITH_TIDY=1
Change-Id: Ic2b0f99b95a5f0422f879226e6f6060cab71456a
2018-08-24 18:42:22 +00:00
Yi Kong
cf4cbdd5a6 Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit c729b508c3.

Reason for revert: New breakages fixed

(cherry picked from commit e1e83e4279)

Change-Id: Ia5ab5cfbee200d2f73f373da2b5d823072f6e3d8
2018-07-03 12:57:17 -07:00
Yi Kong
e1e83e4279 Revert^6 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit c729b508c3.

Reason for revert: New breakages fixed

Change-Id: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
Merged-In: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
2018-06-29 20:35:35 +00:00
Yi Kong
c729b508c3 Revert^5 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit e0050ebda1.

Reason for revert: Breaks build

Change-Id: I01bc218553ae6efb6140b66f035ccb129d3e5028
2018-06-29 08:19:46 +00:00
Yi Kong
e0050ebda1 Revert^4 "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit 8ad44855e6.

Reason for revert: Breakage fixed, try again

Change-Id: Ia648b9513d2224a5e363b65f44f9b2f838db1d3d
2018-06-28 21:05:34 +00:00
Martijn Coenen
8ad44855e6 Revert "Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags"""
This reverts commit cc4bbdccd3.

Reason for revert: breaks builds

Change-Id: Ia8908eb372ce46b23aea73283baf37add4477312
2018-06-13 07:36:05 +00:00
Yi Kong
cc4bbdccd3 Revert "Revert "Move -Wno-enum-compare{,-switch} to external cflags""
This reverts commit 2f71a6adcd.

Change-Id: I09abb194b25813b8b1e4470b22171121cc3f8c11
2018-06-12 22:59:16 +00:00
Yi Kong
2f71a6adcd Revert "Move -Wno-enum-compare{,-switch} to external cflags"
This reverts commit 96d221f914.

Reason for revert: build breakage for sdk target

Change-Id: I933df62738c08b48d8ae4ea951b2cb4837616c78
2018-06-12 04:51:49 +00:00
Yi Kong
96d221f914 Move -Wno-enum-compare{,-switch} to external cflags
Test: m checkbuild
Bug: 72330874
Change-Id: I8aaa020f5efafa8746b2c5ae29cea1a313a28045
2018-06-11 14:54:35 -07:00
Yi Kong
cc80f8d64f Revert "Revert "Add external projects only CFlags option""
This reverts commit a9ccbb7b87.

Test: m
Change-Id: I92d7b7707f73ef3af5824d3e8cb6da0465b5e07d
2018-06-06 16:41:26 -07:00
Kevin Rocard
a9ccbb7b87 Revert "Add external projects only CFlags option"
This reverts commit 6a350878d8.

Reason for revert: Breakage of many AOSP targets

Change-Id: I917e6daa04ac02ecb98c7bb1816f9bdaf46429f5
2018-06-05 21:43:46 +00:00
Yi Kong
6a350878d8 Add external projects only CFlags option
Every time the toolchain adds a new warning, we had to suppress the
warning in every external projects that violates it, or disable it
globally -- which we end up doing most of the time since the first
option is way too time consuming.

Add a separate cflags option for external projects and move existing
-Wno-* flags there so that we can enforce better code quality for
internal projects.

TODO: Move more -Wno-* flags to ClangExtraExternalCflags

Test: m checkbuild
Change-Id: If3dee491616a1e7ba6223c2f522d100e10c5ee76
2018-06-05 19:32:02 +00:00
Pirama Arumuga Nainar
d7feb380c1 Update clang to r328903
Bug: http://b/77532044

* b/77967848 - Disable -Wc++98-compat-extra-semi

Test: Test various targets in AOSP and internal branches.  For Googlers,
go/clang-r328903-testing

Change-Id: If08dafb9ad993fb686dfd6eeb5e2d61a9c99bd0b
2018-04-30 15:18:05 -07:00
Chih-Hung Hsieh
02b4da53a7 Add USE_CLANG_LLD and use_clang_lld.
* USE_CLANG_LLD is unedefined in current builds.
* When USE_CLANG_LLD is defined to 'true' or '1',
  use clang's lld instead of ld or ld.gold.
* When lld is enabled:
  * ld-only flags are not passed to 'lld'.
  * location_packer is disabled.
  * Use new lld's --pack-dyn-relocs=android.
* When lld does not work:
  * In Android.mk files use LOCAL_USE_CLANG_LLD := false.
  * In Android.bp files use use_clang_lld: false.
* Only arm, arm64, x86, and x86_64_devices have LLD flags;
  all other hosts and targets do not call lld yet.

Bug: 73768157
Test: make checkbuild and boot
Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
2018-04-12 14:37:35 -07:00
Chih-Hung Hsieh
3ede294729 Switch to clang 7.0
* Suppress more noisy new warnings at global level.
* Add -no-pie to partial link .o files, with -r.
* Revert workaround of b/72706604, no need of
  -Wl,-plugin-opt,-emulated-tls
* Filter out clang 7.0 unknown flag "-Wno-extended-offsetof"

Bug: 72706604
Bug: 72412006
Test: make checkbuild
Change-Id: I7ff45465c4bd771991f42b40f68dc35586045656
2018-03-26 18:04:47 -07:00
Dan Willemsen
8054f0a9d2 Revert "Fix absolute paths in clang debug output"
This reverts commit 253cab89ee. It is no
longer necessary.

Bug: 36463318
Bug: 72408185
Test: compare output directories after `m libc`
Test: compare treehugger output files
Change-Id: Ib5d7bbc13fa6f547e658247559153c61387e3604
2018-03-08 17:10:54 -08:00
Dan Albert
f2ceea7f1f Disable a warning that libc++'s headers trip.
Test: make checkbuild
Bug: None
Change-Id: I117bd9ef3f4f3c8792f4b6692d7b70ad69b6922d
2018-02-07 17:24:42 -08:00
Stephen Hines
a42e0a0eca Silence warnings rather than keeping them in the logs.
We can simply revert this patch to work on these warnings independently.

Bug: http://b/72331526
Bug: http://b/72331524
Bug: http://b/72330874
Test: Build

Change-Id: I9cec51578a1c6de33fb6f832c758b9916c61b735
2018-02-06 14:51:08 -08:00
Yi Kong
599a6032fc Switch to clang-4579689.
Bug: 68397894
Test: http://go/clang-4523590-testing
Change-Id: Ief806250572fe2cc5f39b4c47ff74863acbbb26d
2018-02-01 10:23:32 -08:00
Dan Willemsen
01f388c343 Add base variables for windows clang
This just copies most of what exists for clang on Linux, but doesn't
actually turn on clang support.

Bug: 69933068
Test: m nothing; compare ninja files
Change-Id: I2cf203026e7ced32004a91d7f3baf4a6415085eb
2017-11-30 15:42:53 -08:00
Colin Cross
d00350c61b Add license headers to all go and shell files
Test: none
Change-Id: I75c443e05f2b1e17fcb6823182717d2e6f5df7c4
2017-11-17 23:05:26 +00:00
Pirama Arumuga Nainar
4c0e1bf4e0 Re-enable -Wunknown-warning-option
Bug: http://b/68236396

This warning only needs to be enabled for frameworks/base/core/jni.

Test: Build the topic
Change-Id: I9f6aab2045f135d691696f9fd461c895a5aadb38
2017-11-10 13:54:47 -08:00
Stephen Hines
0ed7d24f7a Switch to clang-4393122.
Bug: http://b/62580008
Bug: http://b/68236239
Bug: http://b/68236396
Test: https://goto.google.com/clang-4393122-testing
Change-Id: Ib6bcf93e356172aad2a762b730a6f93916a5d845
2017-10-30 16:00:44 +00:00
Jayant Chowdhary
20f5d137ed Make clang libTooling tools ignore all lto flags.
LLVM r275480 does not recognize flto flags, suppress the option in clang
libTooling tools for now.

Bug: 62839002

Test: mma

Change-Id: Ia9d80b46320e551a93dbff780405d8ff8ad73f35
2017-10-27 11:29:52 -07:00
Jayant Chowdhary
9677e8c6ad Black-list for clang LibTooling Cflags.
Add a list of flags which are not understood by clang LibTooling tools
and filter them out of the Cflags the tools are invoked with.

Test: In frameworks/av, make libmedia vendor_available (this invokes
header-abi-dumper on this module), mm -j64.

Bug: 62447349

Change-Id: I46f017212b89f4331145c999103d0ed44da0abaf
2017-06-19 19:43:03 -07:00
Josh Gao
e0b933b74d Globally enable libcxx's thread safety annotations.
Add -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS to clang extra cppflags
to make libcxx always emit thread safety annotations. Note that this
won't generate additional warnings on projects that don't already use
-Wthread-safety.

Test: treehugger
Change-Id: I517a96571d77be119510c981bc2cbaddb41dee95
2017-04-27 18:13:21 -07:00
Dan Willemsen
253cab89ee Fix absolute paths in clang debug output
As of the latest clang python wrapper, clang is being executed with an
absolute path. That means that clang-provided headers are written with
absolute paths in the debug info, making the builds non-reproducible
(especially with ccache).

So keep our current PWD=/proc/self/pwd -fdebug-prefix-map=/proc/self/cwd=,
but add a new -fdebug-prefix-map=$PWD/= to rewrite these absolute paths.

Bug: 36463318
Test: m -j libc adb; grep for path names
Test: spot check objdump -W before/after, see only expected diffs.
Change-Id: Ic2cdfca051d3c38b753fd5c1fcbeaca8bafc29ae
2017-03-27 16:58:43 -07:00
Elliott Hughes
5a0401ab9c Consistently use -std=gnu99 for gcc as well as clang.
This matters for C files that are also built for Windows. Previously they'd
be compiled with -std=gnu99 for the host but [effectively] -std=gnu89 for
Windows.

Bug: http://b/32019064
Test: builds, and can build libcrypto_utils without a manual -std= line
Change-Id: I9c5cc7832220b5c3d6a007ff10d076e26fd8c75d
2016-10-13 14:41:31 +00:00
Colin Cross
b98c8b0595 Move toolchain and global variables into separate package
Move all of the configuration into a cc/config package

Change-Id: If56fc7242062ed1ce3cb297f78a1e0ef7537373c
2016-08-01 13:37:01 -07:00
Renamed from cc/clang.go (Browse further)