Commit Graph

523 Commits

Author SHA1 Message Date
Colin Cross 991008ce19 Support sanitizer variants inside make builds
am: bc6fb16b26

* commit 'bc6fb16b26dedee0e9f10239cb9a6c8a3e647b04':
  Support sanitizer variants inside make builds

Change-Id: I5c75ac2dcc8a11eba3155e0d1d382edb176e8de7
2016-05-25 19:29:07 +00:00
Colin Cross bc6fb16b26 Support sanitizer variants inside make builds
Create both sanitized and unsanitized variants inside make builds with
sanitizers enabled.  Only export the sanitized version to make, and
always install the sanitized version in /data to match the make build.

Change-Id: I5a17bcbddc7a9d871c929c84d3c116228ef3258f
2016-05-24 17:14:15 -07:00
Dan Willemsen a897cbfd33 Stop sorting (C|CPP|LD)FLAGS when checking
am: 9598e1048a

* commit '9598e1048a890810fc35b9655ee603a6994e8665':
  Stop sorting (C|CPP|LD)FLAGS when checking

Change-Id: I04fc04fb2d019777d68c26262c6636fb6b18d806
2016-05-24 01:09:14 +00:00
Dan Willemsen c99fc3d097 Fix and check CLANG_CONFIG_UNKNOWN_CFLAGS
am: e8c5237775

* commit 'e8c5237775f413bbb56084e19054a3d979e15985':
  Fix and check CLANG_CONFIG_UNKNOWN_CFLAGS

Change-Id: I3725569bc11883534d4a41035d91a9599200a756
2016-05-24 01:09:13 +00:00
Dan Willemsen 9598e1048a Stop sorting (C|CPP|LD)FLAGS when checking
Make isn't defining these anymore, so we don't need to sort them before
comparing.

Change-Id: Ia2f13f665309569ee8c564a8fb82639d174a83bb
2016-05-23 15:15:13 -07:00
Dan Willemsen e9b7ce1d10 Check more Make variables
am: 558e517ae9

* commit '558e517ae99d018305a45da6f46ee2a53f47c928':
  Check more Make variables

Change-Id: I6d661d3815302209bf158feaa9f1bb1094b10e12
2016-05-23 19:31:30 +00:00
Dan Willemsen e8c5237775 Fix and check CLANG_CONFIG_UNKNOWN_CFLAGS
Change-Id: Id8d4ab5e7bf7c9ed161596c19ccdfe00aaa2f7c6
2016-05-20 00:19:14 -07:00
Dan Willemsen 558e517ae9 Check more Make variables
Some more common makevars methods were required in order to remove the
"-isystem" prefixes from the toolchain.IncludeFlags() value. In Make,
the -isystem is prepended at time of use, not in TARGET_C_INCLUDES
itself.

Change-Id: If07e69ddb7357d11c7dd48ab60f503d219f29de8
2016-05-20 00:19:14 -07:00
Colin Cross 9deacc3cc5 Add libclang_rt.asan-mips[64]-android.so
am: d87145fe05

* commit 'd87145fe0560f8a5f6a1b5d0e90c8dde30ee66cb':
  Add libclang_rt.asan-mips[64]-android.so

Change-Id: I840e3608be5e561c1c8b61b9fccd384b1704851d
2016-05-20 07:07:47 +00:00
Colin Cross d87145fe05 Add libclang_rt.asan-mips[64]-android.so
Add the clang asan runtime libraries to the mips and mips64 toolchain
definitions.  Fixes missing symbol build errors on asan_test.

Change-Id: I10c46599af2c7758f4726814920b8881644c6f97
2016-05-19 22:43:46 -07:00
Dan Willemsen 1866cb4290 Fix makevars (C|LD)FLAGS ordering
am: d26a713dca

* commit 'd26a713dcac8a2fa750d69751d29bfdfa8fd7717':
  Fix makevars (C|LD)FLAGS ordering

Change-Id: I1e36de7843dd207f444fca0d9aa2c7dd950100dd
2016-05-19 18:34:03 +00:00
Dan Willemsen 2c979349fa Move -msoft-float to ToolchainCflags
am: c264c16638

* commit 'c264c16638aa51caacd1b0d203a536b8b35491c0':
  Move -msoft-float to ToolchainCflags

Change-Id: I363fd9989a2c5223c87b48df2189d31cfbbd9fa3
2016-05-19 18:34:01 +00:00
Dan Willemsen d26a713dca Fix makevars (C|LD)FLAGS ordering
This better matches the order from cc/cc.go, so that any implicit
ordering behaves the same in Make and Soong.

Change-Id: I802d725f037a22c4b2f0ae28258af95efa37ce79
2016-05-18 23:00:57 -07:00
Dan Willemsen c264c16638 Move -msoft-float to ToolchainCflags
-msoft-float is equivalent to -mfloat-abi=soft, which means we need to
make sure the order is correct if we also specify -mfloat-abi=softfp.
Since the Neon support (with -mfloat-abi=softfp) is in the cpu-specific
ToolchainCflags, move the generic definition into ToolchainCflags as
well.

This wasn't actually causing problems when compiling, since the normal
toolchain.Cflags is before toolchain.ToolchainCflags, but the makevars
code accidentally reversed this. That will be fixed as well, but this
will protect against similar problems in the future.

Change-Id: If6f37c845210105f84769bab45fde5d7fdc2fe09
2016-05-18 22:52:25 -07:00
Dan Willemsen 8cb947eb7e Add windows prebuilt library path
am: 03a7086319

* commit '03a708631919145f403a89352e36785eded6c73c':
  Add windows prebuilt library path

Change-Id: I2f487ef05b58440789ba177c640ec1aab02d9df9
2016-05-19 01:23:39 +00:00
Dan Willemsen c7dac05abc Support Windows IncludeFlags
am: d352edf0e8

* commit 'd352edf0e8c5f838d5d2ae853b673535530e0742':
  Support Windows IncludeFlags

Change-Id: I9225287a193fcffe128cb5e5c457eb662beb71ae
2016-05-19 01:23:38 +00:00
Dan Willemsen 32b3e00b7e Add the common directory back to kernel headers.
am: a2abfd6b30

* commit 'a2abfd6b30e80bf39bcc22b4fee91db37f14fa4a':
  Add the common directory back to kernel headers.

Change-Id: Id6f2fff3a1d99b03c59916009122bec1b52dcf9c
2016-05-19 01:23:36 +00:00
Dan Willemsen 03a7086319 Add windows prebuilt library path
This was in HOST_CROSS_GLOBAL_LD_DIRS, which is why it didn't get
translated over here, since Soong does not use global linking
directories. It's being moved to HOST_CROSS_GLOBAL_LDFLAGS so that it
can be shared.

Change-Id: Ie20670278a589ae3cf76e09de4079edfa800cf5b
2016-05-18 16:51:24 -07:00
Dan Willemsen d352edf0e8 Support Windows IncludeFlags
The variable was defined, but it wasn't being exposed to the Toolchain
interface. It was also using -I instead of -isystem.

Change-Id: Iee9862a4b9c50c9497915175a23864b4b2c29c26
2016-05-18 16:51:24 -07:00
Dan Willemsen a2abfd6b30 Add the common directory back to kernel headers.
This is a port of build/ change 6a2f28514.

Change-Id: I9128abf61a56e282f335f540fcf064dd52706b2b
2016-05-18 16:51:24 -07:00
Colin Cross ba47854c4a Rename common to android
am: 635c3b0157

* commit '635c3b0157f38c06833e5e789d0137f99844c0b6':
  Rename common to android

Change-Id: I7fb6657c571dbc2e77c160cd025cb246f7cf2b08
2016-05-18 23:48:50 +00:00
Colin Cross 24280d5a63 Fix ndk x86_64 and mips64 builds
am: c7fd91a266

* commit 'c7fd91a2660c7e0af1ccea0d662e0804998769ee':
  Fix ndk x86_64 and mips64 builds

Change-Id: I03db57ffabde18f8345aa7d4d9cc1d351ae63faf
2016-05-18 22:48:08 +00:00
Colin Cross 635c3b0157 Rename common to android
Rename the "common" package to "android", because common is too
generic.  Also removes all android.Android naming stutter.

Ran:
gomvpkg -from 'android/soong/common' -to 'android/soong/android'
gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext'
gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext'
gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase'
gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext'
gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext'
gorename -from '"android/soong/android".AndroidModule' -to 'Module'

Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7
2016-05-18 15:37:25 -07:00
Colin Cross c7fd91a266 Fix ndk x86_64 and mips64 builds
x86_64 and mips64 NDK prebuilt libraries are stored in .../usr/lib64,
but arm64 and all the 32-bit ABIs use .../usr/lib.  Add a 64 suffix to
the path for all 64-bit ABIs except arm64.

Change-Id: I98e87ff6a7f1aa75adbeb37c5b1e7208b953322f
2016-05-18 22:24:19 +00:00
Dan Willemsen 3429da5c70 Fix Static_executable, implement BUILD_HOST_static from Make
am: 36cff8bb6f

* commit '36cff8bb6fdff4a843dfe65cc83227b7f677dd55':
  Fix Static_executable, implement BUILD_HOST_static from Make

Change-Id: I6a8eacdb7bd5ef03659207d4529f557aec51de34
2016-05-18 00:40:49 +00:00
Dan Willemsen 36cff8bb6f Fix Static_executable, implement BUILD_HOST_static from Make
Static_executable was still using ModifyProperties, and was otherwise
missing things. Fix all of that up, and implement HostStaticBinaries,
which is the equivalent of BUILD_HOST_static in Make. That will default
host binaries to be static, which is useful for building SDK tools to
run with incompatible C libraries.

Change-Id: I2a62181b5d854b310edc8ae7a6bcbd30b89e7463
2016-05-17 16:39:17 -07:00
Dan Willemsen 53ad362d24 Export CONLYFLAGS and CPPFLAGS to Make
am: 216a459ccc

* commit '216a459ccc782d9b47e5663b4c3b81f0e03e2739':
  Export CONLYFLAGS and CPPFLAGS to Make

Change-Id: Ie8286de619a2a8b369376660613ed8e476389fca
2016-05-17 19:51:44 +00:00
Dan Willemsen 216a459ccc Export CONLYFLAGS and CPPFLAGS to Make
Change-Id: I061d531983b5bb544efb2f0ab5912cd2b461f58b
2016-05-17 01:00:50 -07:00
Dan Willemsen da8b053323 Export -D__BRILLO__ to make if necessary
am: 06f453359a

* commit '06f453359a6686e20d00e7ab661e39ce0e0e5bb5':
  Export -D__BRILLO__ to make if necessary

Change-Id: I0b5236fe6a32c52e00e50d88b99928a1ad4ef6ad
2016-05-17 02:41:00 +00:00
Dan Willemsen 06f453359a Export -D__BRILLO__ to make if necessary
Fixes Brillo builds

Change-Id: Ia3563b0c9e000d95ed18d05460f5c8c32e04e191
2016-05-16 19:32:33 -07:00
Dan Willemsen fb2eaaf8f2 Turn on strict checking for C[PP]FLAGS make vars
am: b436fdee65

* commit 'b436fdee65b2ae27576b37f1f13a324bc9c7f51a':
  Turn on strict checking for C[PP]FLAGS make vars

Change-Id: If75cd0402c85326307ef6d1657c3f8153f904a38
2016-05-17 02:05:51 +00:00
Dan Willemsen aaaeb15c73 Don\'t use -B...gcc.. on Darwin
am: 3772da13fd

* commit '3772da13fd9b4d1f0aec35c73883c1cb5b60fd35':
  Don't use -B...gcc.. on Darwin

Change-Id: Iad450b34cc85054b573ec0c2b8537414def9ef52
2016-05-17 02:05:50 +00:00
Dan Willemsen b436fdee65 Turn on strict checking for C[PP]FLAGS make vars
Change-Id: I8448feb55b54515856798c1b3e8070d0e07e0b6c
2016-05-16 18:04:45 -07:00
Dan Willemsen 3772da13fd Don't use -B...gcc.. on Darwin
We don't ship binutils on Darwin, so there is no point in telling clang
to look in that path. (The path being used doesn't even exist). This
matches the Make behavior.

Change-Id: I663047057ff8df8a349483532da8018af13d50d8
2016-05-16 18:04:01 -07:00
Colin Cross 1004805108 Merge "Include bionic/Android.bp"
am: 88c4750c51

* commit '88c4750c518f3910725f74295d21286291551f5d':
  Include bionic/Android.bp

Change-Id: Id61be2e4e7e5f92747e67bccceae741dcd99336f
2016-05-17 00:52:30 +00:00
Colin Cross 88c4750c51 Merge "Include bionic/Android.bp" 2016-05-17 00:42:17 +00:00
Colin Cross 3e5889a791 Include bionic/Android.bp
bionic/Android.bp exists now, and subdirectories are handled with
Android.soong.mk files.

Change-Id: I70259ff5c2fb9df2f8716590502f49de1c2c8ac7
2016-05-16 16:56:51 -07:00
Dan Willemsen 9c1c2f7fb8 Merge changes I7fd53084,I6b7a3062
am: 8911062843

* commit '89110628436557ef0f4e851f0ad63f83cfc74652':
  Properly export toolchain static libs
  Add more make-exported variables

Change-Id: I726f23c9af9867cfa7a9920a02f1acf8b680f502
2016-05-16 23:52:06 +00:00
Treehugger Robot 8911062843 Merge changes I7fd53084,I6b7a3062
* changes:
  Properly export toolchain static libs
  Add more make-exported variables
2016-05-16 23:42:51 +00:00
Dan Willemsen e7932e890b Properly export toolchain static libs
Change-Id: I7fd5308469aee5a43d576d1a72f7738dc6f9fbaa
2016-05-16 15:56:53 -07:00
Dan Willemsen 73d21f25cb Add more make-exported variables
Change-Id: I6b7a30624923b8ca879d4ac7a3f1f11aec9b9b8a
2016-05-16 14:22:56 -07:00
Evgenii Stepanov ba40c3cd29 Merge "USE_SAFESTACK support in Soong."
am: 6e39d270fa

* commit '6e39d270faa8fb5656188a4ded0c419327130718':
  USE_SAFESTACK support in Soong.

Change-Id: I1b3d4fee33e1261fb328231284434dd05298ea20
2016-05-16 20:25:14 +00:00
Evgenii Stepanov 6e39d270fa Merge "USE_SAFESTACK support in Soong." 2016-05-16 20:19:39 +00:00
Dan Willemsen 5a3c5a3217 Merge "Create empty .a on Darwin when there is no obj file."
am: 1e45ef6823

* commit '1e45ef6823b54965d19da3a33404955d8a9a2e13':
  Create empty .a on Darwin when there is no obj file.

Change-Id: I52a972558c7fb94eb31aef8ea9146fd578a9b709
2016-05-13 22:39:09 +00:00
Dan Willemsen 390657eb77 Don\'t use GTEST_OS_LINUX on Darwin
am: 4a94683a60

* commit '4a94683a60ab44c520628f381c9cf63496b3e62e':
  Don't use GTEST_OS_LINUX on Darwin

Change-Id: I0fc3ec973a6efc849a1c476c974f9f70af2fa4b8
2016-05-13 22:39:09 +00:00
Dan Willemsen 1e45ef6823 Merge "Create empty .a on Darwin when there is no obj file." 2016-05-13 22:35:33 +00:00
Dan Willemsen 4a94683a60 Don't use GTEST_OS_LINUX on Darwin
Change-Id: If77118591daa7b474e6989e03109ea32ddd357b2
2016-05-13 22:28:07 +00:00
Dan Willemsen 9f0b550a15 Create empty .a on Darwin when there is no obj file.
On Darwin ar would fail if there is no object file to add.
We work around by adding a dummy.o.

Port to Soong of build/ 4aaa1a1fd8e7eb23ac5557cd326d1a48efdb54cd

Change-Id: I68bbebea2726058c25863d7026a645a520d05167
2016-05-13 15:07:37 -07:00
Dan Willemsen 4faa4d6aa9 Update gtest flags from Make
am: 8146b2f1c9

* commit '8146b2f1c90cb86c488a385dc912deba6de78553':
  Update gtest flags from Make

Change-Id: I4c260b2611924815e3d0447b4f0e7cb9bd16c0b5
2016-05-13 21:48:37 +00:00
Dan Willemsen 8146b2f1c9 Update gtest flags from Make
There's a different libgtest to use for NDK libraries built with
different STLs. And we no longer need to add the gtest include path, as
it's exported.

Change-Id: I2f804cf98e074cfd4ea6b70a445e304a8a8bce50
2016-05-13 20:47:24 +00:00