Dan Albert
08cca28f92
Add support for ubsan.
...
Rather than adding LOCAL_UB_SANITIZER, LOCAL_THREAD_SANITIZER, etc for
each new sanitizer, deprecate LOCAL_ADDRESS_SANITIZER in favor of
LOCAL_SANITZE that mirrors the behavior of -fsanitize=<sanitizers>.
For example, the following will use both asan and ubsan:
LOCAL_SANITIZE := address undefined
We'll leave LOCAL_ADDRESS_SANITIZER around for compatibility until we
can clean up the tree.
Change-Id: I8a62315129d4753f8e992584ca6db1e5dfdd4d2a
2015-04-08 15:52:04 -07:00
Chih-Hung Hsieh
9205bc1da6
Filter out gcc flags that are not recognized by clang.
...
Change-Id: I04e95fc3b0cb2825bf90a55916f89d25fa9fc475
2015-04-02 14:42:20 -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
f68002187a
Don't warn on definition of possibly reserved identifiers.
...
Change-Id: Icfcfa94aac0503c97dee0ff4d0cd49107201526d
2015-03-25 17:28:57 -07:00
Chih-Hung Hsieh
78df832481
Filter out unsupported flag: -fprefetch-loop-arrays
...
Change-Id: I55ba9045948a910ebd76c09f9f4ebb6b37eed1e7
2015-03-05 16:02:04 -08:00
Dan Albert
b58fb4aac6
Let clang decide ASan linker flags for the host.
...
Pass -fsanitize=address instead of manually specifying asan libraries
and other linker flags.
Note that we enable LOCAL_ALLOW_UNDEFINED_SYMBOLS by default for host
builds because ASAN only links symbols in the final executable, so
there will _always_ be undefined symbols in intermediate libraries.
Bug: 18208352
Change-Id: Ief55ab296e94974560eeb10507ec8d90f0025d5c
2014-12-05 14:52:56 -08:00
Stephen Hines
433f1614b0
Switch to Clang 3.6.
...
This change also defaults C compilations with clang to gnu99, and turns off
the -Winconsistent-missing-override flag, since we need further cleanup to
turn it on. -finline-functions is an unnecessary flag that only gcc needs.
Change-Id: I1cfcaedca32d9e3c248a6aa9460603205901c491
2014-12-03 15:11:09 -08: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
Ying Wang
a69e59623b
am 478eda53
: Merge "FORCE_BUILD_LLVM_COMPONENTS if HOST_PREFER_32_BIT."
...
* commit '478eda5365f866c830f957d6bd1aba3854d55bcc':
FORCE_BUILD_LLVM_COMPONENTS if HOST_PREFER_32_BIT.
2014-11-07 00:58:32 +00:00
Ying Wang
e5d4e74f9f
FORCE_BUILD_LLVM_COMPONENTS if HOST_PREFER_32_BIT.
...
Because we don't have 32-bit prebuilt libLLVM/libclang.
Change-Id: I86dac33e9bcbcb3d197f7d1e4c9d33bd4e7c473e
2014-11-06 14:11:33 -08:00
Stephen Hines
f1c5dd60b2
am 35e4ede5
: Merge "Use automatic color option with the latest clang."
...
* commit '35e4ede5974053d05ae0f8791e60ba77a31907b3':
Use automatic color option with the latest clang.
2014-11-04 17:44:44 +00:00
Stephen Hines
c141b85ef1
Use automatic color option with the latest clang.
...
Bug: 18187181
Now that I checked in the latest prebuilts, clang will automatically use
color on terminals and no color on redirection to files or non-terminals.
Change-Id: I9be00c44947946cc18ce59c936b7f45d0ce2b6fc
2014-11-03 23:42:10 -08:00
Ying Wang
7f18adc240
am 871b8df1
: Merge "Add -fcolor-diagnostics to global clang cflags."
...
* commit '871b8df128b144f39d40889e463722a032c4d246':
Add -fcolor-diagnostics to global clang cflags.
2014-10-30 23:43:02 +00:00
Ying Wang
c7d1a973b0
Add -fcolor-diagnostics to global clang cflags.
...
Bug: 18187181
Change-Id: Ifcbe34b685b1dfd7ffc801bcdad7bd8208e45f86
2014-10-30 12:22:29 -07:00
Chih-Hung Hsieh
736a146c3c
am 717ebfc1
: Merge "Add unknown flag to CLANG_CONFIG_UNKNOWN_CFLAGS."
...
* commit '717ebfc13182202ab38e17c0cd008924e9e5c4e9':
Add unknown flag to CLANG_CONFIG_UNKNOWN_CFLAGS.
2014-10-28 04:48:54 +00:00
Chih-Hung Hsieh
22b6c5c2c1
Add unknown flag to CLANG_CONFIG_UNKNOWN_CFLAGS.
...
BUG: 18108271
Change-Id: Id929cad31340d2946027603c1c8c8fb1cb60f66a
2014-10-23 16:39:09 -07:00
Bill Yi
13466f0f79
Merge commit '66b3e31936b99436e01c473dca492126eea3e336' into HEAD
2014-10-22 08:45:57 -07:00
Ying Wang
18cd02257d
Merge "Add -Wno-unused-command-line-argument to clang cflags to enable ccache."
2014-10-21 19:19:16 +00:00
Ying Wang
24e03369cf
Add -Wno-unused-command-line-argument to clang cflags to enable ccache.
...
Previously ccache is disabled when it fails calling clang's preprocessor with
unused arguments (such as '-Wa,--noexecstack') in the command line.
See http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html .
(-Qunused-arguments suppresses more than
-Wno-unused-command-line-argument does.)
Change-Id: I6cde307632c8395c053eb28063d7844d93070562
2014-10-20 17:21:16 -07:00
Dan Albert
96983cba42
am cc0aa4da
: am 28c265dd
: Merge "We also need -rdynamic for host ASAN."
...
* commit 'cc0aa4dabd4bae2b17bc9de8f88e04e862d030b2':
We also need -rdynamic for host ASAN.
2014-10-20 22:42:11 +00:00
Dan Albert
4ffe3f5b9f
We also need -rdynamic for host ASAN.
...
Change-Id: Iee33ca85c25d9bf126be8318a3b837074ab10076
2014-10-20 13:54:27 -07:00
Dan Albert
66acb2a8ae
resolved conflicts for merge of 96c22133
to lmp-dev-plus-aosp
...
Change-Id: I35a2f403e9e664536b45b5ac9185adf1e1a02442
2014-10-20 13:37:18 -07:00
Dan Albert
2daceaa83c
Add support for ASAN in host modules.
...
Change-Id: Id9ed83499e0eb995f06e845c3153a50677d768b8
2014-10-20 11:37:18 -07:00
Stephen Hines
532376db67
am 56f688bc
: Merge "Switch TBLGEN-related executables to use "BUILD_" instead of "HOST_"." into lmp-dev
...
* commit '56f688bce5f3229f065a94446d049bc3a055b92b':
Switch TBLGEN-related executables to use "BUILD_" instead of "HOST_".
2014-10-01 23:01:29 +00:00
Stephen Hines
b34b7aeb31
Switch TBLGEN-related executables to use "BUILD_" instead of "HOST_".
...
Bug: 14416410
Change-Id: Ife2d7329795f229adcddc5c57b20aa96c56387c0
2014-09-30 02:37:20 -07:00
Stephen Hines
7a5d35b22a
am 145eddfd
: am 670018fd
: Merge "Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables."
...
* commit '145eddfd229b118fadd4f4f255dbecc1a79b5e2b':
Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables.
2014-09-26 19:53:06 +00:00
Stephen Hines
03b61bea0d
am 3041b7d1
: am 3cf20570
: Merge "Use new variable LLVM_PREBUILTS_VERSION to simplify path construction."
...
* commit '3041b7d1f4f457082f8de50bba31adb479731d36':
Use new variable LLVM_PREBUILTS_VERSION to simplify path construction.
2014-09-26 19:53:05 +00:00
Stephen Hines
f00896663e
Remove unnecessary CLANG_CONFIG_EXTRA_*_C_INCLUDES variables.
...
These aren't needed now that we only use the compiler/headers that exist in
the prebuilts/clang directory.
Change-Id: I9978efb10815e92577d45629db324e0a5094f880
2014-09-25 22:35:16 -07:00
Lai Wei-Chih
8affa161fe
Use new variable LLVM_PREBUILTS_VERSION to simplify path construction.
...
This removes the hard-coded '3.5' in the various paths and makes switching to
a new toolchain easier from the command line (m LLVM_PREBUILTS_VERSION=3.6).
Change-Id: I46b10eb2fc177a03528de9c7b433f8647f632081
2014-09-24 14:59:00 -07:00
Chih-Hung Hsieh
1df281a08a
am 9e59e663
: am 90d5c7f6
: Merge "Clang rejects -Wno-old-style-declaration flag."
...
* commit '9e59e66373a68782179f5522d125c8617ecd92a6':
Clang rejects -Wno-old-style-declaration flag.
2014-08-27 02:50:29 +00:00
Chih-Hung Hsieh
60d2b58fa2
am 0b97fd8a
: am b699b0ea
: Merge "Clang does not recognize -Wno-literal-suffix."
...
* commit '0b97fd8acef5d69b2f0abf19493ec5640bbd2085':
Clang does not recognize -Wno-literal-suffix.
2014-08-27 00:01:43 +00:00
Chih-Hung Hsieh
fb482c6d5d
Clang rejects -Wno-old-style-declaration flag.
...
BUG: 17258227
Change-Id: I2a35263298ffd8dd7cda25183e185274cbf62b7b
2014-08-26 16:37:00 -07:00
Chih-Hung Hsieh
4d12b5788d
Clang does not recognize -Wno-literal-suffix.
...
BUG: 17258227
Change-Id: I2d98e68daa780fbe0e127605840ae7edcb4e9880
2014-08-26 15:30:04 -07:00
Ying Wang
b53efd68b5
am 18c20aae
: am aea1cae4
: Merge "Revert "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang."""
...
* commit '18c20aae44b5736b673c8776202e1e76b6bd81cd':
Revert "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.""
2014-07-30 16:22:00 +00:00
Ying Wang
1b0fc43557
Revert "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.""
...
This reverts commit a4f84fdfed
.
Added "export CCACHE_CPP2 := true" to work around ccache bug with clang.
See:
http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html
Change-Id: I2b1fa8fd59c3a113c4028a92a1d16018133c9792
2014-07-29 18:05:27 -07:00
Marcin Kosiba
dc5be215db
am bf4ac764
: am 6be7d2e5
: Merge "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.""
...
* commit 'bf4ac764cdc7bf6b09e30b79ca6088ef17de9e07':
Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang."
2014-07-28 11:57:17 +00:00
Ying Wang
defccfe52f
am 53e19fd4
: am 45040bdb
: Merge "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang."
...
* commit '53e19fd4e259ea47e6b81b8472fbdc6041ca7044':
Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.
2014-07-26 00:52:21 +00:00
Ying Wang
b169fb7822
Revert "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.""
...
This reverts commit a4f84fdfed
.
Added "export CCACHE_CPP2 := true" to work around ccache bug with clang.
See:
http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html
Change-Id: I2b1fa8fd59c3a113c4028a92a1d16018133c9792
2014-07-30 10:14:37 -07:00
Tim Murray
72c70d14d4
resolved conflicts for merge of 2812b27c
to lmp-dev-plus-aosp
...
Change-Id: I770fbf16affbd43b0750b50426298038e4b573b7
2014-07-24 14:27:05 -07:00
Marcin Kosiba
6be7d2e5bb
Merge "Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.""
2014-07-23 19:31:58 +00:00
Dan Albert
a4f84fdfed
Revert "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang."
...
This broke the world.
This reverts commit 3b7a4d811d
.
Change-Id: Iefb01b8642a92bcc718d2c745e8ce1346ba50143
2014-07-26 20:35:06 +00:00
Tim Murray
92d79cbb41
Switch host builds to use Clang by default.
...
If LOCAL_CLANG is not set to false for a host module, clang will be used instead of gcc.
This also enables the integrated assembler by default for Darwin host builds.
bug 16172793
Change-Id: If7484c5dbcccce7d925bec97bff0a3e4c30e9434
2014-07-24 09:25:58 -07:00
Ying Wang
45040bdbb8
Merge "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang."
2014-07-23 18:04:01 +00:00
Marcin Kosiba
3b7a4d811d
Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang.
...
This is essentially Ide800c24f0c2ebbb1cfb358bd8f99ec8a9d41253
applied to clang.
Change-Id: I883f9e9a31fff50a64568a06ef5248437344542b
2014-06-19 15:33:26 +01:00
Brian Carlstrom
3bd5abb4f9
am a44f9a35
: am edbc4595
: am d51730a6
: Merge "Help catch common 32/64-bit errors."
...
* commit 'a44f9a35a284c600616a7f2213a861ecdefd5615':
Help catch common 32/64-bit errors.
2014-06-17 23:38:48 +00:00
Brian Carlstrom
338d1e7f33
Help catch common 32/64-bit errors.
...
(cherry picked from commit cf5ea762e015bc044d251814d9062ef1df4dd49f)
Change-Id: I43eb93d41967c63acb0723083c0178019f1364d0
2014-06-17 15:23:49 -07:00
Ying Wang
f7988507f4
am 2d19cbd2
: resolved conflicts for merge of 135e11df
to klp-modular-dev-plus-aosp
...
* commit '2d19cbd279ed69c7202f089be174c35c1585f709':
Switch to 32-bit-by-default host multilib build.
2014-06-11 19:26:30 +00:00
Ying Wang
2713fcebba
Switch to 32-bit-by-default host multilib build.
...
Also we don't need to force LLVM built from source, for we already force
LLVM to be built as 32-bit.
Bug: 13751317
Change-Id: Ifadf1988d28b60cb06316de50f5bdc1834f1acc0
2014-06-09 17:48:05 -07:00
Tim Murray
a526c48982
am 45c39300
: am 3c52ff07
: am e564c0cb
: Merge "Switch name from tblgen -> llvm-tblgen for consistency with upstream tools."
...
* commit '45c3930084180857d7b09c0859805506e7ede847':
Switch name from tblgen -> llvm-tblgen for consistency with upstream tools.
2014-06-04 19:22:56 +00:00
Stephen Hines
5339640da6
Switch name from tblgen -> llvm-tblgen for consistency with upstream tools.
...
Change-Id: I7735fd88104ff95001dd5f88a1c387df9af993ad
2014-06-03 18:28:44 -07:00