Commit Graph

1786 Commits

Author SHA1 Message Date
Colin Cross
9b834e541e Don't generate Android.mk data if the module is disabled
am: cc4f3e3f94

Change-Id: Ib357a63acc1c92b6c227b946be73f139c195531d
2016-11-30 05:14:24 +00:00
Colin Cross
99d7c23006 Provide config helpers for environment variables
Add GetenvWithDefault, IsEnvTrue, and IsEnvFalse helpers to Config.

Test: m -j checkbuild
Change-Id: Id855e5349115eb2a18b2e73cfd1bd84b5874ff93
2016-11-29 15:29:34 -08:00
Colin Cross
bba99041db Split cc_prebuilt_shared_library into static variants
Prebuilts must have every variant that their source module has, so
split all cc_prebuilt_shared_library modules into both static and
shared variants.

Test: m -j checkbuild
Change-Id: I3c32315227f779e832e041cfab604ff7402c7e13
2016-11-29 15:29:34 -08:00
Colin Cross
0f3c72fa17 Disable installing unused prebuilts
If the source module is being used instead of the prebuilt module,
disable installing the prebuilt module.

Test: m -j checkbuild
Change-Id: I55e77021b0f9572b0737d960cba89274f696775d
2016-11-29 15:29:34 -08:00
Colin Cross
cc4f3e3f94 Don't generate Android.mk data if the module is disabled
Move the calls to the AndroidMkProvider to after checking if the
module is disabled.  Disabled modules may not have all the state
necessary to generate the data.

Test: m -j libLLVM
Change-Id: Iab27a26e604f3810bcc2d9f61b1839aa7bc428b4
2016-11-29 15:29:34 -08:00
Dan Willemsen
c415039ced Add basic VNDK support in Soong
am: d2ede879b5

Change-Id: I2441b81dfd6637d4af6b5d748601494498774050
2016-11-29 20:42:39 +00:00
Dan Willemsen
d2ede879b5 Add basic VNDK support in Soong
Export a list of libraries in the VNDK, which is currently empty.

Take in Make's global BOARD_VNDK_VERSION, and use that as the SDK
version for modules that specify use_vndk: true.

Modules that use the vndk have some configuration as if they were
building against the NDK (the absence of globally defined headers), but
in other cases look like platform modules (using the platform libc++,
for now).

This change does not attempt to enforce any linking constraints, that
will come in a later patch.

Test: out/soong/build.ninja doesn't change
Change-Id: I3be206b67015ac5177b7eef4a451c579e3dc903f
2016-11-28 13:45:24 -08:00
Colin Cross
116403006a Merge changes I3454370a,I18dd900d
am: 112fd2b9b1

Change-Id: I7daf539df4d483c983f4904cbea3cc367f8527e7
2016-11-25 18:25:38 +00:00
Colin Cross
88d3652f37 Move global cppflags to the beginning of cppflags
am: b668826a85

Change-Id: Ia93b79e1c73dafdc9c2887af97d62e45681193d6
2016-11-25 18:25:37 +00:00
Colin Cross
c847ac3e62 genrule: let Android.bp file specify exported header dirs
am: 5ed99c6472

Change-Id: I222030cb0d7cc73d3332f7789507c40b961e4186
2016-11-25 18:25:35 +00:00
Treehugger Robot
112fd2b9b1 Merge changes I3454370a,I18dd900d
* changes:
  Move global cppflags to the beginning of cppflags
  genrule: let Android.bp file specify exported header dirs
2016-11-25 05:49:38 +00:00
Colin Cross
541a8a65ec Merge "genrule: support deps files"
am: 10f96b1d77

Change-Id: I15148c3bd969f0ba78ee6c729916db460e55fa2d
2016-11-23 23:44:13 +00:00
Colin Cross
10f96b1d77 Merge "genrule: support deps files" 2016-11-23 23:38:28 +00:00
Colin Cross
a14071cf6c Merge "genrule: expand $$ to $$"
am: d328ad708e

Change-Id: I012afbfb9c8afa0203ac59ffa4495476b4c393fd
2016-11-23 03:40:23 +00:00
Treehugger Robot
d328ad708e Merge "genrule: expand $$ to $$" 2016-11-23 03:37:59 +00:00
Stephen Hines
35586f3802 Merge "Add proper use of LLVM_RELEASE_VERSION for locating libraries."
am: 9dfd48b9bc

Change-Id: If02fd242fddb4ab32fbdac9b8cdf35bef1d9dba9
2016-11-23 02:28:48 +00:00
Stephen Hines
9dfd48b9bc Merge "Add proper use of LLVM_RELEASE_VERSION for locating libraries." 2016-11-23 02:23:46 +00:00
Colin Cross
4c32014bc8 Add more whitelisted host libraries
am: 124fd9afbd

Change-Id: I7456e636550e40c1c1729191f10670eda2580afa
2016-11-23 01:43:45 +00:00
Colin Cross
b668826a85 Move global cppflags to the beginning of cppflags
Global cppflags should come first so they can be overriden by module
cppflags.

Test: m -j checkbuild
Change-Id: I3454370a6b35f37982b1e0de2e0ec52b54974a8a
2016-11-22 15:41:09 -08:00
Colin Cross
5ed99c6472 genrule: let Android.bp file specify exported header dirs
Instead of exporting the generated sources dir as headers, let
the Android.bp file specify subdirectories as exported.

Test: m -j checkbuild
Change-Id: I18dd900d63ce7485c8fbfcc39dc77abad6f733d7
2016-11-22 15:41:09 -08:00
Colin Cross
33bfb0a36a genrule: support deps files
If a genrule sets deps_file: true, use a file in the gen directory
as a GCC-style deps file.

Test: m -j libLLVMObject
Change-Id: Id410165847e4eaea1853a392512e38787c431523
2016-11-22 15:41:09 -08:00
Colin Cross
2ee10a0659 genrule: expand $$ to $$
An escaped $ sign in an expanded string needs to be re-escaped so it
can pass through to ninja.

Test: m -j libLLVMObject
Change-Id: I2f7890417fd6f534e6e21cace3d86ae9ef708ce5
2016-11-22 15:41:08 -08:00
Colin Cross
124fd9afbd Add more whitelisted host libraries
Add AppKit, Foundation and Security to darwin for libchrome.

Add -lm and -lversion to windows for llvm.

Test: m -j libLLVMObject
Change-Id: Ie5c922d3fbb41fba1de5f1ce9e530683bf411c5a
2016-11-22 15:41:04 -08:00
Stephen Hines
e55a4cc594 Add proper use of LLVM_RELEASE_VERSION for locating libraries.
Bug: http://b/31532493

As I have been updating to LLVM ~4.0, there are numerous locations where
3.8 is hard-coded, and unable to be overridden. This change adds a new
function for getting the ClangShortVersion(), which can look at
environment variables that override this value (particularly useful for
two-stage compilation, where version numbers change between builds).

Change-Id: Iaec19908cf47b3b2317844d6e1329f7bcd81f022
2016-11-18 17:12:38 -08:00
Dan Willemsen
21cd6c847e Add Toolchain.Bionic()
am: 2e47b34435

Change-Id: I66b2502c56b3b44794679cd258ec0dc8c194012d
2016-11-18 03:13:02 +00:00
Dan Willemsen
c97c4626b9 Allow Host cc_object and cc_toolchain_library
am: 967c6a9b87

Change-Id: Ia4025f09a116e8e49ed009d7231be3d9beab0202
2016-11-18 03:13:02 +00:00
Dan Willemsen
cf7da2e936 Add LinuxBionic OsType
am: 00fcbde401

Change-Id: Ie41af907b555ece88cda7b571f593e4ad957b8a6
2016-11-18 03:13:01 +00:00
Dan Willemsen
7dbdaa7fa5 Encode default enabled state in OsType
am: 0a37a2a2b8

Change-Id: I8377ced8a03bdd2f1dec123f59aab7d19ed2beb4
2016-11-18 03:12:59 +00:00
Dan Willemsen
2e47b34435 Add Toolchain.Bionic()
Move some cc ctx.Host() / ctx.Device() checks over to using
ctx.toolchain().Bionic(). There will be more changes, these are just the
obvious ones dealing with host_ldlibs / crt / system libraries.

Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: Ibba60483b4ab0e01f6996eb7d883120e4acc1830
2016-11-17 01:50:43 -08:00
Dan Willemsen
967c6a9b87 Allow Host cc_object and cc_toolchain_library
In preparation for LinuxBionic.

Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: I8e4631ccc3ad5161d76871a43f31d5a4ecbd39c0
2016-11-17 01:50:14 -08:00
Dan Willemsen
00fcbde401 Add LinuxBionic OsType
Actual support will come in later changes.

Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: I31392fb78a51f43567d16aef89e32cd5137cdbc1
2016-11-17 01:49:50 -08:00
Dan Willemsen
0a37a2a2b8 Encode default enabled state in OsType
Currently our only default-disabled Os is Windows since it's HostCross,
but we'll be adding non-default Host and Device types in the future.

Bug: 31559095
Test: out/soong/build.ninja is identical
Change-Id: I2bc3a3cc76f2c95ea040bc34ba6706fcc178c68d
2016-11-17 01:49:39 -08:00
Dan Albert
f17634d777 Support sdk_version: "current" for the NDK.
am: ebedf678de

Change-Id: I4acb096fb922c2c692590dbbf92147a7c54eb795
2016-11-11 02:21:47 +00:00
Dan Albert
e7754d3f27 Allow first_version: "current" in ndk_library.
am: 90f7a4dcab

Change-Id: I7141ce08ce3fbc9506a8d05db33d8a61a84ace8d
2016-11-10 23:55:09 +00:00
Dan Albert
bb53f9a3cb Generate "current" API level.
am: fd86e9ee21

Change-Id: I81251ad8358a6412962e328a85a86f6f42c77d92
2016-11-10 23:55:08 +00:00
Dan Albert
ebedf678de Support sdk_version: "current" for the NDK.
We need to fall back to the old CRT objects since we aren't generating
those yet.

Test: Created a test module using "current", checked that it linked
      the libs from current.
Bug: None

Change-Id: I5fe170d7b26154da8877672ac2acb7da0262fe38
2016-11-10 14:01:08 -08:00
Dan Albert
90f7a4dcab Allow first_version: "current" in ndk_library.
Test: Added a test module that uses this
      find $SOONG_OUT -name libfoo.so # only shows up in current
Bug: None

Change-Id: Ic88d7c598cd5b6ded8fb851a7eaf859806336af7
2016-11-10 14:01:08 -08:00
Dan Albert
fd86e9ee21 Generate "current" API level.
Support for using this coming in an upcoming patch.

Test: nose2
      readelf to check the following:
      * bsd_signal unversioned before current
      * bsd_signal versioned in current
      * catclose missing before current
      * catclose present and versioned in current
Bug: None
Change-Id: I861862161426d3ec5b530e3156d3a8ae96fed468
2016-11-10 13:49:26 -08:00
Dan Albert
1cbdfe9068 Revert "Revert "Use the platform SDK version from the config.""
am: 073379e549

Change-Id: I8d333d190f6e7a19de3858b9382383d7179d980b
2016-11-10 21:39:59 +00:00
Dan Albert
cee02d71f7 Fix the Platform_sdk_version default.
am: 22c0b4131d

Change-Id: I7b76711050b3a3aa9164c99fd48c20694367671c
2016-11-10 21:39:58 +00:00
Dan Albert
073379e549 Revert "Revert "Use the platform SDK version from the config.""
This reverts commit 74b8b55bb2.

Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \
          build/soong/scripts/build-ndk-prebuilts.sh
Bug: None

Change-Id: Ia320609ec6fb382b13ff9007a6496b73198ff871
2016-11-10 11:11:07 -08:00
Dan Albert
22c0b4131d Fix the Platform_sdk_version default.
N has merged into aosp now.

Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \
          build/soong/scripts/build-ndk-prebuilts.sh
Bug: None

Change-Id: I2685c700e2cb138708a3e8a5f51281c30fb582db
2016-11-10 11:11:07 -08:00
Dan Albert
c273d449e2 Merge "Revert "Use the platform SDK version from the config.""
am: 8f0f1757f5

Change-Id: Ida38854d79f2443f15e5121bb866f17619fd0f0a
2016-11-10 18:03:44 +00:00
Dan Albert
8f0f1757f5 Merge "Revert "Use the platform SDK version from the config."" 2016-11-10 17:47:39 +00:00
Dan Willemsen
4bd310a28a Merge "Add export_include_dirs to the local include path"
am: 7eaa5c8824

Change-Id: I010919ca36256d42b232294fd6c19b3603abea6b
2016-11-10 05:52:26 +00:00
Treehugger Robot
7eaa5c8824 Merge "Add export_include_dirs to the local include path" 2016-11-10 05:42:42 +00:00
Colin Cross
9022833edd Merge "Pass PREBUILT_SDK_VERSION to soong ndk build"
am: 7f1c10b9b1

Change-Id: I9a28bc60d1bd9ed4d2f89a2df1c8070ca23fd8ff
2016-11-10 01:00:59 +00:00
Colin Cross
7f1c10b9b1 Merge "Pass PREBUILT_SDK_VERSION to soong ndk build" 2016-11-10 00:47:33 +00:00
Colin Cross
9fe6ea834f Pass PREBUILT_SDK_VERSION to soong ndk build
Extract PREBUILT_SDK_VERSION from the make build system and pass
it to soong when doing ndk builds.

Test: untested
Change-Id: I573900dfb83aa8665c2bc349b7823e64497754d3
2016-11-09 13:01:41 -08:00
Dan Albert
74b8b55bb2 Revert "Use the platform SDK version from the config."
This reverts commit 9bef523809.

Reason for revert: Broke things

Change-Id: Ic3deac4fb6992572ac0cc95fa04d003e0c29f113
2016-11-09 19:39:42 +00:00