Commit Graph

2276 Commits

Author SHA1 Message Date
Treehugger Robot
33edec5651 Merge "Have AndroidMk skip emitting LOCAL_MODULE_TAGS="optional"" 2017-03-16 23:44:41 +00:00
Vishwath Mohan
7a5b46db91 Add ar flags for CFI enabled components in Soong.
CFI enabled components need ar to use the gold linker. This CL adds
that.

Bug: 36290748
Test: Enabling CFI for a Soong component builds without error.
Change-Id: Icbf78fa1ca0d845350516b4dd345b54fbb7ef847
2017-03-16 16:36:16 -07:00
Vishwath Mohan
cabe0dc741 Allow custom ar flags to be set.
am: 83d9f71cc5

Change-Id: I3768b87f329f79f186f0cb6a67871fc6f9ab838a
2017-03-16 23:09:31 +00:00
Vishwath Mohan
83d9f71cc5 Allow custom ar flags to be set.
Adds the ability to set custom flags for ar in Soong, similar to how
they can currently be set for make.

Bug: 36290748
Test: sanitize.go is able to correct set custom ar flags for CFI. CFI
enabled Soong components build and boot without issue.

Change-Id: I3212793aa84ba51df910c184d8bb376b3650376e
2017-03-16 14:06:30 -07:00
Dan Willemsen
8335721789 Refactor compressWholeFile to take a zipEntry
am: a8b5502773

Change-Id: If97538bc10f4f48d5a2b61f8cc09c39bef16a03f
2017-03-16 06:44:34 +00:00
Dan Willemsen
a8b5502773 Refactor compressWholeFile to take a zipEntry
Test: m -j vts; compare android-vts.zip
Test: soong_zip -C ./ -f short_test.sh -f log -o test.zip
Change-Id: I9a843c6f8436ecfacc7948915e50f25c04497057
2017-03-15 21:53:58 -07:00
Dan Willemsen
3783cb9e5c Preserve executable bit in soong_zip
am: 10462b3fd5

Change-Id: Iff573d83fd33ae5e063b3d46c6800bdc83e9d712
2017-03-16 04:10:54 +00:00
Dan Willemsen
10462b3fd5 Preserve executable bit in soong_zip
Bug: 36292596
Test: m -j vts; zipinfo out/host/linux-x86/vts/android-vts.zip
Change-Id: If595641544cc387019d93b99e0a7890e0b7a9453
2017-03-15 19:13:30 -07:00
Dan Willemsen
a0422d3551 Add LinuxBionic toolchain and switch
am: 01a405a481

Change-Id: I171e1bfc0128850d94ee1935ddf6675d4996a376
2017-03-15 22:53:04 +00:00
Dan Willemsen
eea081cafd Stop making the ndk headers host-specific
am: 0e2d97b4b1

Change-Id: I8d4d08194fdc8392a178f5dd1e82cafd3d323d3f
2017-03-15 22:53:02 +00:00
Dan Willemsen
01a405a481 Add LinuxBionic toolchain and switch
This adds a toolchain definition for LinuxBionic that only supports
Clang/64-bit. It pulls pieces from the x86_linux_host and x86_64_device
configs, and uses the android clang triple, with some manual overrides.

To enable building this, set your soong.config file to:

 {"Host_bionic": true}

Bug: 31559095
Test: out/soong/{Android,make-vars}-aosp_arm64.mk the same with or
      without host bionic turned on
Test: No change to out/soong/build.ninja before/after this change
Change-Id: Id97dda8bd9aa670c32aed31fbe6aaa8175e70b59
2017-03-15 14:18:42 -07:00
Dan Willemsen
0e2d97b4b1 Stop making the ndk headers host-specific
This breaks when I enable a second host configuration for host bionic.

Make non-arch modules !Device and !Host by adding "Generic" as the zero
value. Make the SkipDeviceInstall config only apply to Device modules.

Test: out/soong/build.ninja is identical expect for comments
Change-Id: I6e2bd3814a9968554d3901a508d822d5c79d08a0
2017-03-15 20:20:22 +00:00
Dan Willemsen
d25d2e5d5e Enable large-address-aware for 32-bit windows
am: 7752bca25d

Change-Id: Id767f757513f18a39a1105f582f0a003d3e9b3b6
2017-03-15 01:18:33 +00:00
Dan Willemsen
7752bca25d Enable large-address-aware for 32-bit windows
Bug: 36046324
Test: m -j winsdk-tools
Change-Id: I232d7dac9a6708542e70392801259141bec297c6
2017-03-14 13:37:26 -07:00
Jiyong Park
16163c26cc install *.so in different paths for their types
am: 4c48f724e1

Change-Id: Ic9c1abd4a1799a646f682d8b6324d6382a63b3a7
2017-03-14 00:22:49 +00:00
Jiyong Park
4c48f724e1 install *.so in different paths for their types
Shared libraries are now installed to different directories depending on
their types.

* NDK libraries: /system/lib/ndk
* VNDK libraries: /system/lib/vndk
* VNDK-ext libraries: /system/lib/vndk-ext
* Framework-only libraries: /system/lib
* Vendor-only libraries: /vendor/lib
* Same-process HALs: /vendor/lib/sameprocess

In addition, a new module type vndk_ext_library is added. It is almost
identical to cc_shared_library but it introduces another attribute
'extends'. This is use to reference the vndk library that this vndk-ext
library is extending.

For example, in order to extend a vndk library libFoo:

cc_library {
  name: "libFoo",
  srcs: [...]
}
---------------------
vndk_ext_library {
  name: "libFoo-extended",
  srcs: [...]
  extends: "libFoo"
}

Then, libFoo will be installed as /system/lib/vndk/libFoo.so and
libFoo-extended will be installed as /system/lib/vndk-ext/libFoo.so.
Note that file name of the latter is libFoo.so, not libFoo-extended.so:
file name of an extending module is automatically set to that of the
extended module.

Bug: 33681361
Test: build & run. Libraries must be in the correct directories.
Change-Id: Ia1eb3940605d582a252c78da0f3a5b36fdab062b
2017-03-14 09:13:44 +09:00
Dan Willemsen
5f2b83e49e Always use the standard OSX SDK tools
am: 300151ba19

Change-Id: I0abc5c06c9d57963bd45a67622bd2b4e9948a8f0
2017-03-13 21:14:49 +00:00
Dan Willemsen
300151ba19 Always use the standard OSX SDK tools
Instead of whatever happens to be in PATH.

Test: port install gcc5; attempt to build host binaries
Change-Id: If4af32596edd6fd3e459c3d574ab0ff495f236ff
2017-03-13 12:40:30 -07:00
Nan Zhang
2502e12ba9 Fixed the issue of dependencyTag in prebuilt.go
Directly using blueprint.BaseDependencyTag might cause issues because
if other modules also use blueprint.BaseDependencyTag, the
different type of modules will be mixed when fetched based on Tag.

Test: m -j out/soong/build.ninja
Change-Id: I290ca2eea063e5daa4f572985b105b958fa1d0fd
2017-03-09 18:50:31 -08:00
Jeff Gaston
4f2feeee50 Have AndroidMk skip emitting LOCAL_MODULE_TAGS="optional"
Also somewhat consolidate the way in which properties are converted

Bug: 34671474
Test: make blueprint_tools

Change-Id: Idf0d6d63b8539ab6e514a6043d1f88836899864b
2017-03-08 16:00:14 -08:00
Dan Willemsen
6e7da12af7 Fix OUT_DIR_COMMON_BASE with soong_ui
am: 0c3919e996

Change-Id: I6c443368394b37681e587e971589274a14a8098d
2017-03-03 18:55:26 +00:00
Dan Willemsen
0c3919e996 Fix OUT_DIR_COMMON_BASE with soong_ui
Currently, Kati is the only one that is respecting OUT_DIR_COMMON_BASE,
causing the build to fail when ninja tries to match up the Soong and
Kati ninja files.

The soong_ui.bash script change is necessary to move the microfactory
built outputs to the correct location.

The config.go change takes care of setting OUT_DIR in the environment of
every subprocess, so that we could remove the OUT_DIR_COMMON_BASE
handling from Make once the USE_SOONG_UI=false path goes away.

Bug: 35929763
Test: m -j blueprint_tools
Test: OUT_DIR=... m -j blueprint_tools
Test: OUT_DIR_COMMON_BASE=... m -j blueprint_tools
Change-Id: I4184f2b4392d32c5bea51e51162a48df0e5c90d5
2017-03-02 19:42:21 -08:00
Hridya Valsaraju
c65be274eb Merge "Add frameworks/hardware/interfaces and system/hardware/interface"
am: 88744e25d4

Change-Id: I9ce6a5f65e51a304b3a45cea4a590f9cc70e5aa0
2017-03-02 18:42:58 +00:00
Treehugger Robot
88744e25d4 Merge "Add frameworks/hardware/interfaces and system/hardware/interface" 2017-03-02 18:38:38 +00:00
Hridya Valsaraju
d8860e3cb7 Add frameworks/hardware/interfaces and system/hardware/interface
Add frameworks/hardware/interfaces and system/hardware/interfaces
to Soong build target.

Bug: 35882393
Test: make

Change-Id: I63af71f23e8a61425cf673a2340111ffa6404203
2017-03-02 08:52:58 -08:00
Dan Willemsen
962d4dcf12 Fix dist if $DIST_DIR/logs doesn't exist
am: abc56d4fc7

Change-Id: Ib3b6a9faf2ce6c68218ba6faf28f89292b322a4b
2017-03-02 03:18:50 +00:00
Dan Willemsen
abc56d4fc7 Fix dist if $DIST_DIR/logs doesn't exist
Bug: 35886901
Test: rm -rf out; m -j dist
Change-Id: I1008d9eef884d60766e35a543e72df5df01d61de
2017-03-01 17:39:32 -08:00
Ryan Campbell
52296356ee Support path exclusion for native coverage.
am: 469a18aae2

Change-Id: I5ef8823b0b55431534462761f3ffbd21ba249bb6
2017-02-28 02:11:27 +00:00
Ryan Campbell
469a18aae2 Support path exclusion for native coverage.
Specify list of paths to exclude from coverage instrumentation.

Test: make NATIVE_COVERAGE=true COVERAGE_PATHS=hardware/interfaces
COVERAGE_EXCLUDE_PATHS=hardware/interfaces/graphics
Bug: 35769817

Change-Id: I3bf10e5e5697d140d6cff73d000768b00aa28ca4
2017-02-27 11:08:34 -08:00
Dan Willemsen
a557ab6910 Merge "Updates for the new ckati drop"
am: 4c46af8943

Change-Id: I0bafcf8c0a8259a5cb1a36a69ac1ee13b58f4bda
2017-02-24 23:27:37 +00:00
Treehugger Robot
4c46af8943 Merge "Updates for the new ckati drop" 2017-02-24 23:20:23 +00:00
Josh Gao
3648a4bc18 Merge "Add libwinpthread, link it into win32 binaries."
am: 664806a843

Change-Id: I957ee789236609d2b7fb5532f538a4e2dbe19df5
2017-02-24 21:08:59 +00:00
Josh Gao
664806a843 Merge "Add libwinpthread, link it into win32 binaries." 2017-02-24 21:02:24 +00:00
Dan Willemsen
c38d366d78 Updates for the new ckati drop
We can start removing out directories again in multiproduct_kati, since
the opendir bug has been fixed.

Add --color_warnings to the Kati command line. Since this is different
from Make, take this opportunity to reorder the command line to make
more sense. This wasn't done before because kati forces a regen whenever
the command line changes.

Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I5ad03359fbc16db482722946202297c1ae0f2b90
2017-02-24 10:53:23 -08:00
Josh Gao
7bd4c5c339 Add libwinpthread, link it into win32 binaries.
Bug: http://b/31665213
Test: wine adb.exe
Test: wine fastboot.exe
Change-Id: I6d6ff69f0c016e2654119a09161685841cbccc7e
2017-02-23 17:57:03 -08:00
Dan Albert
9060b1777c Merge "Add preprocessed_ndk_headers."
am: 9383f82428

Change-Id: I278cd8633460a985e7df06c82b1a53217622623c
2017-02-23 21:11:15 +00:00
Dan Albert
9383f82428 Merge "Add preprocessed_ndk_headers." 2017-02-23 21:06:47 +00:00
Colin Cross
c0af80fbcd Merge "Remove cpusets and schedboost product variables"
am: 3c776d1b74

Change-Id: I9763e24df5e2e8400149f0eea2d18c71a4469a2b
2017-02-23 19:21:16 +00:00
Treehugger Robot
3c776d1b74 Merge "Remove cpusets and schedboost product variables" 2017-02-23 19:16:06 +00:00
Colin Cross
d2906e5deb Remove cpusets and schedboost product variables
They are no longer needed, remove them.

Bug: 35129304
Bug: 35128496
Test: builds
Change-Id: Ib144ddc2db40bc4f38a4e06ca40eabe85814e03c
2017-02-23 09:44:22 -08:00
Dan Willemsen
eb22dda417 Don't use runtime.Version() to find the current go version
am: fde8534680

Change-Id: Ief8f39921e5e833ca4e31db445050239bdf21b91
2017-02-23 07:38:16 +00:00
Dan Willemsen
fde8534680 Don't use runtime.Version() to find the current go version
That will be the go version at compile time. So read $GOROOT/VERSION, or
fall back to executing `$GOROOT/bin/go version` to find the go version
currently in GOROOT.

Test: Ensure everything rebuilds when switching between go1.8rc2 and go1.8
Change-Id: I8738a7aa249a088b1e0668af260fa3974844dab7
2017-02-22 22:03:04 -08:00
Dan Albert
269fab82eb Add preprocessed_ndk_headers.
Prototypes in the bionic headers are annotated with `__INTRODUCED_IN`
tags that are processed by bionic/tools/versioner into their usable
form (tags replaced with `#if __ANDROID_API__ >= foo` guards). We've
previously done this as a periodic manual step with the results
checked in to prebuilts/ndk, but that's been a huge hassle for me.
Make the tool a part of the build instead.

Test: make checkbuild
Bug: http://b/35673791
Change-Id: I2f5c1aeae239ac4ab6616eb5c71360e3055f86d5
2017-02-22 14:52:52 -08:00
Dan Willemsen
2e883365e8 Merge "Improve signal handling in soong_ui"
am: fd96d2421a

Change-Id: I5304f3284133d9c017c9ef53d69880654d05915c
2017-02-22 20:33:19 +00:00
Treehugger Robot
fd96d2421a Merge "Improve signal handling in soong_ui" 2017-02-22 20:29:53 +00:00
Dan Willemsen
a23eb2e2f6 Filter kati output to collapse verbose messages
am: 29f88279ba

Change-Id: I96fabf3766f9b1f8b627f6cc9e4267ddd40fa526
2017-02-22 19:26:49 +00:00
Dan Willemsen
9af5fb9ac8 Improve signal handling in soong_ui
Bug: 35214134
Test: ctrl-C during build
Test: add for{} to hang soong_ui in multiple places, ensure it exits
Change-Id: Ic71eedd4b1814ab2f3c441ae61a97570eda4fe16
2017-02-22 10:44:19 -08:00
Dan Willemsen
29f88279ba Filter kati output to collapse verbose messages
1. Collapses the "including .../Android.mk ..." lines like ninja does,
so that we overwrite the last line if there wasn't anything else to
print.
2. Strips ansi control codes so that log files don't include unreadable
characters.

Test: m -j
Test: m -j | tee output.log   (with colored output)
Change-Id: Ib18437f6f9d37084360097a9d586800c833072c5
2017-02-21 19:40:49 -08:00
Colin Cross
9d91b89d78 Merge "increase javac_filter line length limit to 2MB"
am: 5e07dc57c4

Change-Id: Idb854e2eef11b51f4a00fb03ab602f62b6845e52
2017-02-20 07:01:26 +00:00
Treehugger Robot
5e07dc57c4 Merge "increase javac_filter line length limit to 2MB" 2017-02-20 06:56:15 +00:00