Commit graph

147 commits

Author SHA1 Message Date
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
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
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
Colin Cross
57546850da Merge "Remove HOST_PREFER_32_BIT" am: 182ff5e2e7 am: a128976547 am: 0ab4eb9734
am: 3de35b8ada

Change-Id: Id379d498af36fd393cfe22ddb54d3b5e61accd2c
2016-09-03 00:47:21 +00:00
Colin Cross
70e0ac6bc1 Remove HOST_PREFER_32_BIT
HOST_PREFER_32_BIT was used during the switch to 64-bit host tools to
keep the SDK building as 32-bit, but is never set any more.

Change-Id: I874f89c7d1e9cd8c9d4c879048d81a4362ce4dce
2016-09-02 13:20:52 -07:00
Chih-hung Hsieh
18e3c9401e Merge "Make it an error when LOCAL_CLANG is false." am: 9204b776bb am: f329021c0f am: aefdd322de
am: b1012bd713

Change-Id: I49c29e4db7b4c7f8263ed758e516f43c49fbf4ca
2016-08-05 22:44:18 +00:00
Chih-Hung Hsieh
2ee4c1abbf Make it an error when LOCAL_CLANG is false.
Only projects in LOCAL_CLANG_EXCEPTION_PROJECTS can set LOCAL_CLANG to false.
Add external/gentoo/integration to this white list.

Bug: 30575506
Change-Id: Icd508686bc2eb8b9d400200166df80115af20da1
Test: build and find new warning in build.log
2016-08-05 11:21:20 -07:00
Chih-Hung Hsieh
3d723c3312 Add projects not compiling with clang.
Bug: 30575506
Change-Id: Iffe9bebb3f063f52a3cc879176ed7c0f3ae8652a
2016-08-03 14:44:27 -07:00
Chih-Hung Hsieh
3ea1e51ebe Allow late binding of LOCAL_CLANG_EXCEPTION_PROJECTS.
* INTERNAL_LOCAL_CLANG_EXCEPTION_PROJECTS is defined later in other config.mk.
Bug: 30575506
Test: build and find new warning in build.log

Change-Id: If5341a856d1792add38c80a15b8deae39f156138
2016-08-03 11:57:30 -07:00
Chih-Hung Hsieh
82c78c5445 Allow some bionic tests to compile with gcc.
bionic/tests has some test cases compiled with both gcc and clang.

Bug: 30575506
Change-Id: I68576a931021089ecc6b9c9d14ef0b3e3cf05e2d
Test: build and find new warning in build.log
2016-08-03 10:42:10 -07:00
Chih-Hung Hsieh
d9cd1fafb5 Issue warning on projects with LOCAL_CLANG set to false.
* LOCAL_CLANG_EXCEPTION_PROJECTS is the list of project prefixes.
* New warning message is detected by warn.py as high severity.

Bug: 30575506
Change-Id: I87a38b2ba6bab1d2e5e7a9d5ec9557f0e609727c
Test: build and find new warning in build.log
2016-08-02 16:10:49 -07:00
Dan Willemsen
6e22c756fc Drop CLANG and CLANG_CXX in the environment
We'll explicitly pass these variables to the static analyzer builds in
binary.mk

Bug: 29071982
Change-Id: Ifc7633d36f5785fe16b63f54b885396c2cab542a
2016-06-06 13:13:50 -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
30b57cd7d5 Merge "Remove make variables exported from Soong" 2016-05-18 00:36:46 +00:00
Dan Willemsen
7701eaa5b2 Remove redundant clang cppflags
Cppflags always get added to cflags, so we don't need to duplicate clang
cppflags extras that are already in the clang cflags extras

Change-Id: Ic099f565f20fd993fc0713c033fbc5154373c98f
2016-05-17 00:42:41 -07:00
Dan Willemsen
4863dafcb1 Remove make variables exported from Soong
These have all been strictly checked by Soong, so the values currently
match. Just remove them so that the make variables exported by Soong
will take over.

This also removes some of the GCC reconfiguration, since we haven't
implemented that in Soong. If it becomes useful in the future, we'll
implement it there.

Some things like TARGET_TOOCHAIN_ROOT can nearly be removed, but are
used before the Soong-exported make_vars.mk is loaded. In that case,
added to the clang cflags, so it can be removed once the cflags are
removed.

Others, like LLVM_PREBUILTS_VERSION are loaded even earlier -- in
envsetup.sh before we've even configured Soong. So for now, keep the
Make definition, and continue ensuring it's the same as the Soong
version.

Change-Id: I554b27062ac43610828a8c06d640d919a2dc21ca
2016-05-16 20:39:58 -07:00
Stephen Hines
348b81a404 Update RS to use latest Clang-2812033 prebuilts as well.
Change-Id: I62e294e2b8c882c235a6ac7518fa352acd46e055
2016-04-29 16:50:48 -07:00
Chih-Hung Hsieh
460171a3e4 Add tidy.mk to set up global default checks.
* Default checks include only google* minus google-readability*.
* Some google-* checks are disabled for external projects.
* Each project can add more or disable checks through LOCAL_TIDY_CHECKS.

Bug: http://b/27779618
Change-Id: I83eed73bd2bddaace565a6dde532fb2036b4fac4
2016-04-25 12:17:03 -07:00
Pirama Arumuga Nainar
6721b1d185 Merge changes from topic 'rebase_r256229'
* changes:
  Switch to clang-2690385
  Update RenderScript build rules for rebase to LLVM r256229
2016-03-18 21:54:51 +00:00
Pirama Arumuga Nainar
41f4b242e3 Update RenderScript build rules for rebase to LLVM r256229
http://b/26987366

- Use clang-2690385 to build RenderScript toolchain.
- Use armv7-linux-androideabi as the triple used to build RenderScript
  runtime libraries.

Change-Id: I582e8b25bbc38b101a2e765028ed61edbce7bdc2
2016-03-17 13:30:02 -07:00
Chih-Hung Hsieh
ad741e6d66 Link in ASAN library if my_global_santitize is set.
* When my_global_santitize is set and requires ASAN,
  link with ASAN library even when local module is not
  instrumented with ASAN, unless the local module is
  the ASAN library itself.
* Add -Wl,--as-needed to my_ldflags for shared libraries
  so that unneeded ASAN library would not become
  a dependent of the built .so file.
* Change shared file and executable file link argument order
  so that -Wl flags will have effect on linked-in libraries.
* Remove unused ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES.

BUG: 27614834

Change-Id: I4eda6003f1f24e498cba91c043dbe1fabe522686
2016-03-15 16:53:46 -07:00
Elliott Hughes
eb295fccb4 clang now supports -fdebug-prefix-map=.
Change-Id: Id0569831f09845871d8e6990c310516bea5a2510
2016-02-19 13:34:57 -08:00
Chih-Hung Hsieh
765c1ea6d7 Use newest clang static analyzers.
* When WITH_STATIC_ANALYZER is set and non-zero, and clang compiler is used,
  call new clang ccc-analyzer or c++-analyzer.
* Otherwise, if WITH_SYNTAX_CHECK is set and non-zero,
  call compiler with -fsyntax-only.
* Replace "--sysroot=path" with "--sysroot path", to work with ccc-analyzer.
* ccc-analyzer executes the original compilation command to generate
  object files before calling clang with --analyze to do static analysis.
* When clang is called with --analyze, macro __clang_analyzer__ is defined.

BUG: 13287788

Change-Id: I5edb25b52998d871385dd000778db2ce83224078
2016-02-11 16:43:51 -08:00
Dan Willemsen
9ecbf83259 Add 64-bit windows cross-compiles
This is mostly the same as the existing 2ND_HOST / HOST_CROSS support.

The interesting thing I did here was make x86 the 'first' architecture,
and x86_64 the second. This way LOCAL_MULTILIB := first defaults to
32-bit windows modules.

  windows-x86/bin   <- defaults to 32-bit executables
  windows-x86/lib   <- 32-bit libraries, like before
  windows-x86/lib64 <- 64-bit libraries
  windows-x86/obj   <- 32-bit intermediates
  windows-x86/obj64 <- 64-bit intermediates

Then modules are registered with the names:

  host_cross_liblog    <- 32-bit, like before
  host_cross_liblog_64 <- 64-bit

Bug: 26957718
Change-Id: I9f119411acb43e973ec1e6bca3c1dc291c91556c
2016-02-05 16:33:18 -08:00
Stephen Hines
cdb52b5186 Fix LLVM_RTLIB_PATH for new prebuilts.
This moved from lib/ to lib64/, but wasn't noticed because no one builds
with the profiler on by default.

Change-Id: I0155263b4a50437ea0864338fb34baefc3df59d2
2016-02-04 11:43:41 -08:00
Stephen Hines
6ef329eb4d Switch to clang-2577113.
Bug: http://b/25282907

This is actually based on clang/LLVM upstream revision r256229.

Change-Id: I335be68f196e5b55ac2816fa854e97b841b54240
2016-02-01 23:37:14 -08:00
Colin Cross
41fed8c082 Merge "Don't force color diagnostics outside of ninja" 2016-02-01 18:57:50 +00:00
Stephen Hines
49b695375c Add an RS_CLANG variable as well for RenderScript.
Change-Id: I33a73c4c2b19aa17bc18a64c92a86565111de3d0
2016-01-22 15:11:58 -08:00
Stephen Hines
96d2a8c5e4 Add clang rules for RS_LLVM_* tools.
This change adds new variables for RS_LLVM_* tools, which correspond
to the version of LLVM checked in currently to external/, instead of
mapping to the latest host prebuilts. This will help prevent version
differences for newer IR generated by the updated host prebuilts, which
then might not be readable with the on-device LLVM bits we build from
external/.

Change-Id: I6c7b0fa9082e9c8244cc508cb23960569a057740
2016-01-21 23:50:53 -08:00
Colin Cross
dbd43849fb Don't force color diagnostics outside of ninja
Building with USE_NINJA=false and piping build output to a file will
result in ANSI color codes in the build output.  Only force ANSI codes
on when building with ninja, which strips the ANSI codes when writing
build output to a non-TTY.

Change-Id: Ifd2fb53799fd99c23b7ad91cdb84d943bf707db0
2016-01-13 14:05:54 -08:00
Dan Albert
2d6d5c6e53 Really allow overriding the LLVM prebuilts path.
Not sure why my previous testing was working without this, but kati is
a bit pickier about ?= vs :=.

Change-Id: I80243a3c93dec7fd9b8e6f92e2c6cc956706ace0
2015-11-18 18:01:31 -08:00
Dan Albert
8b1d17706f Allow overriding the LLVM prebuilts path.
The automated build will need to do a two stage build, and we want to
do that without altering the source directory. Building with
`make LLVM_PREBUILTS_BASE=/path/to/prebuilts` will build using an
arbitrary toolchain instead of the installed one.

Bug: http://b/17441393
Change-Id: I4ff5c5224fbb8ebeb3a752907d6c4cd0a925aa1e
2015-11-13 23:06:07 -08:00
Stephen Hines
e8119e96fc Switch from clang 3.6 to new clang repository (with 3.8).
This reverts commit f7dbab16ff.

Bug: 23396112

Switch from "-fsanitize-undefined-trap-on-error" to
"-fsanitize-trap=all". The former ends up accidentally leaving
unresolved calls to __ubsan* helper functions in the object file with
clang 3.8. The latter is used when we don't include address sanitizer,
and replaces any misbehavior with a direct call to abort().
2015-11-09 16:32:11 -08:00
Stephen Hines
f7dbab16ff Revert "Switch from clang 3.6 to new clang repository (with 3.8)."
This reverts commit 1332828b6e.

Bug: 25141123

Change-Id: Idd5d8757095b2b370046a84aea76bc95e16f3876
2015-10-21 09:09:38 -07:00
Stephen Hines
f5782d6097 Merge "Switch from clang 3.6 to new clang repository (with 3.8)." 2015-10-21 00:18:05 +00:00
Dan Willemsen
6a66a887ba Stop encoding absolute paths in symbols
GCC & Clang encode the current working directory into the symbol files.
Even if the binaries are stripped before being installed, the build-id
hash will be different. This means that two different checkouts will
produce different installed binaries, even if the sources are identical.

To prevent this, set PWD=/proc/self/cwd, so that it replaces the
absolute path with the static path /proc/self/cwd. With GCC, use
-fdebug-prefix-map to remove that static path. Our clang does not yet
support this flag, but it was merged in r250094.

This does change the behavior when using gdb -- you now need to be in
$ANDROID_BUILD_TOP before gdb will load the sources.

Bug: 24204119
Change-Id: I792d65b042b7a3fdc78d567c5a6e93cdf0141b9b
2015-10-14 17:30:11 -07:00
Stephen Hines
1332828b6e Switch from clang 3.6 to new clang repository (with 3.8).
Bug: 23396112

Switch from "-fsanitize-undefined-trap-on-error" to
"-fsanitize-trap=all". The former ends up accidentally leaving
unresolved calls to __ubsan* helper functions in the object file with
clang 3.8. The latter is used when we don't include address sanitizer,
and replaces any misbehavior with a direct call to abort().

Change-Id: I8a67461b45f5f1dd9f2d179b6b64a4ca905e999f
2015-10-01 10:42:15 -07:00
Colin Cross
ba9bc4d70f am 0d97557d: Merge "Enable color output from gcc and clang"
* commit '0d97557d3d6f56cf6dfdb7552d4f1471d56dfabe':
  Enable color output from gcc and clang
2015-09-25 23:17:02 +00:00
Colin Cross
63e3b0294f Enable color output from gcc and clang
Force gcc and clang to always output color diagnostics.  Ninja will
strip the ANSI color codes if it is not running in a terminal.

Bug: 24273983
Change-Id: Ic9252549bfacf3bbb3f4b9d20f63010fc24ac21d
2015-09-24 22:39:17 -07:00
Dan Albert
d9f9836e5e am 3ee9daac: Merge "Remove WITHOUT_(HOST|TARGET)_CLANG."
* commit '3ee9daac6a3bf8d2a9030b99f62595330f22cafa':
  Remove WITHOUT_(HOST|TARGET)_CLANG.
2015-09-16 23:31:41 +00:00