Commit graph

6043 commits

Author SHA1 Message Date
Dan Willemsen
16dbb39afd PATH: Allow more tools
pkill and sleep are used in
device/generic/goldfish/tools/emulator_boot_test.sh

pgrep is used by GOMA

bc and pwd are used by kernel builds

Test: none
Change-Id: If7004255b4776fa4409fdd4b0aa6d6617b471317
2018-06-06 11:33:59 -07:00
Colin Cross
dd0b4e06f5 Merge "Add kotlin stdlib to javac classpath" 2018-06-06 04:42:26 +00:00
Treehugger Robot
f181bc9733 Merge "Integrate Metalava to Soong Build" 2018-06-06 04:36:53 +00:00
Colin Cross
49da2757cd Add kotlin stdlib to javac classpath
Java modules that have .kt sources may also use kotlin stdlib types
in their .java sources.

Bug: 78245848
Test: m checkbuild
Change-Id: I064cb76b8a641ad92d648febaa400bc01549a9c5
2018-06-06 00:32:24 +00:00
Nan Zhang
79614d1c14 Integrate Metalava to Soong Build
Test: Manually checked-in prebuilt metalava.jar to my local src tree and
      compare the doclava based api file and metalava based api file.
Bug: b/78245848

Change-Id: Ib434f1e15403a78a0ccf89d9aacb70a6f8b05b2b
2018-06-05 14:44:43 -07:00
Kevin Rocard
a9ccbb7b87 Revert "Add external projects only CFlags option"
This reverts commit 6a350878d8.

Reason for revert: Breakage of many AOSP targets

Change-Id: I917e6daa04ac02ecb98c7bb1816f9bdaf46429f5
2018-06-05 21:43:46 +00:00
Yi Kong
6a350878d8 Add external projects only CFlags option
Every time the toolchain adds a new warning, we had to suppress the
warning in every external projects that violates it, or disable it
globally -- which we end up doing most of the time since the first
option is way too time consuming.

Add a separate cflags option for external projects and move existing
-Wno-* flags there so that we can enforce better code quality for
internal projects.

TODO: Move more -Wno-* flags to ClangExtraExternalCflags

Test: m checkbuild
Change-Id: If3dee491616a1e7ba6223c2f522d100e10c5ee76
2018-06-05 19:32:02 +00:00
Treehugger Robot
85b1e39ffe Merge "Fix mac sdk build" 2018-06-05 00:47:16 +00:00
Treehugger Robot
d9e8b8c40c Merge "Fix droiddoc date error on Darwin" 2018-06-05 00:00:12 +00:00
Treehugger Robot
1efd4a9c81 Merge "Add a preprocessed_ndk_headers module type." 2018-06-04 23:40:03 +00:00
Nan Zhang
46130975ab Fix droiddoc date error on Darwin
Bug: b/109579193
Test: m -j all-docs
Change-Id: I708f200c8dbd5a135767d0ffb10786f223471850
2018-06-04 15:19:40 -07:00
Nan Zhang
bea0975f18 Fix embedded_launcher can't find files
The problem came from Python libraries doesn't know the information that
we enabled embedded_launcher (only Python binary knows about that). And
we can't simply remove runfiles dir for Python libraries since host
Python mode need this.

Bug: b/80441699
Test: m perf_profo_flames
Change-Id: I73ffc4d7504f95a708ae7cca47bc6c15a673aa31
2018-06-04 12:32:55 -07:00
Dan Willemsen
fdb20d05bc Fix mac sdk build
Use the host platform "strip", and also expose "nm" and "otool" used for
toc.

Test: `m PRODUCT-sdk-sdk` on Mac
Change-Id: I7a6d127f479d3e563385ead46bc3a4b49b99776b
2018-06-03 16:19:56 -07:00
Treehugger Robot
1d2318d6cd Merge "Allow more PATH tools, expose HOST_STRIP" 2018-06-01 23:58:15 +00:00
Chih-hung Hsieh
a4181126ee Merge "Handle pack_relocations in linker.cc" 2018-06-01 20:43:11 +00:00
Dan Willemsen
f6d300662e Allow more PATH tools, expose HOST_STRIP
atree was using the host's strip tool during sdk generation, so expose
the prebuilt for use instead.

`id` was used with a test running minijail0 during the build

`sha1sum` is used by development/build/tools/mk_sdk_repo_xml.sh

`rmdir` was being used to remove some tmp files

Test: m PRODUCT-sdk_arm64-sdk dist sdk_repo
Test: Run other builds through forrest
Change-Id: I49c756a3e9497c0bbd9030754e6aa193a2d989a4
2018-06-01 12:48:41 -07:00
Dan Albert
cb1b4b2d53 Add a preprocessed_ndk_headers module type.
Unlike the old version of this (which has been renamed to
verioned_ndk_headers), this module includes a property to specify the
preprocessor to be used.

This is going to be used for preprocessing ICU4C's unicode/uconfig.h
to alter a config value that needs to differ between the platform and
the NDK.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/548
Change-Id: If5c6f54f90cf5a4187693a941748d72f39b0d797
2018-06-01 11:02:38 -07:00
Dan Willemsen
4972f88699 Merge "Revert "Revert "Revert "Revert "Add path interposer""""" 2018-06-01 02:14:44 +00:00
Dan Willemsen
184901135c Revert "Revert "Revert "Revert "Add path interposer""""
This reverts commit 09f4540d66.

Fixes the raw call to net.Listen in the tests to go through the listen()
helper and use the long socket path fallbacks.

Removes the use of timeouts from the tests -- the behaviors being tested
did not rely on timeouts, so removing them will reduce the flakiness if
the build is heavily loading the machine at the same time the test is
running.

Also fixes some potential nil pointer dereferences.

Test: OUT_DIR=<really long> m blueprint_tools
Test: `while .../soong-ui-build-paths/test/test; do sleep 0.01; done` with a build running
Change-Id: I16d44be7517bc415f1c808284088f4ba40df3bfa
2018-05-31 14:59:33 -07:00
Vishwath Mohan
05b002dea0 Don't enable diagnostics for CFI when setting the CFI sanitizer.
The SetSanitizer() method in cc/sanitize.go was also enabling
diagnostics for CFI when invoked from the sanitizer mutator. We
shouldn't be doing this, so this CL disables that.

Bug: 79785496
Test: strings libziparchive.so | grep 'ubsan'
Change-Id: Iffe0d4e9c333ac5dfbec3f48e381c232ce5d4463
2018-05-30 20:52:39 -07:00
Colin Cross
86a60ae6fa Add core-lambda-stubs to classpath
Add core-lambda-stubs to the bootclasspath for modules with no
sdk_version or with sdk_version: "current", and to the classpath
for modules that specify a specific sdk_version number.  Use the
prebuilt sdk-core-lambda-stubs when using a prebuilt SDK.

Fixes compiling modules with lambdas against the SDK.

This reapplies I5e700f2dd86f1a6b84b7a55dd9bfe21a448d3fb6 with fixes
and tests for unbundled builds.

Bug: 80428539
Test: java_test.go
Change-Id: Ib7aaeebb93137270d7336a7293a08ed7064a3184
2018-05-30 16:47:00 +00:00
Treehugger Robot
6c2e97364e Merge "Revert "Add core-lambda-stubs to classpath"" 2018-05-30 07:23:09 +00:00
Colin Cross
7cdc22edb9 Revert "Add core-lambda-stubs to classpath"
This reverts commit d9d7be0617.

Reason for revert: Broke unbundled builds.

Bug: 80428539
Change-Id: I2279dbd2b11a2f63e70ad89d0b3bc42bca2b676b
2018-05-30 05:45:09 +00:00
Treehugger Robot
f3c251c5de Merge "LOCAL_SDK_VERSION is not emitted for recovery variant" 2018-05-30 03:29:51 +00:00
Treehugger Robot
9c75391168 Merge "Add bpf module type" 2018-05-30 02:43:03 +00:00
Treehugger Robot
c550ed5833 Merge "Add aidl properties" 2018-05-30 01:52:57 +00:00
Jiyong Park
97686288dd LOCAL_SDK_VERSION is not emitted for recovery variant
recovery variants are not built with NDK (useSdk() is false for
recovery). So LOCAL_SDK_VERSION shouldn't be emitted for the recovery
variants as well.

Test: m -j liblzma.recovery does not show any link type check error

Change-Id: Icb6c4fc766060e3f1555c405d5785ef5a015c629
2018-05-30 10:37:25 +09:00
Colin Cross
3840659243 Add bpf module type
Add a module type for compiling .c to .o using clang --target=bpf.

Bug: 72981744
Test: m
Change-Id: Ie5712bfabe34901a84ed33737053306ca56ebeb4
Merged-In: Ie5712bfabe34901a84ed33737053306ca56ebeb4
(cherry picked from commit 3ba736a7e1)
2018-05-29 17:05:23 -07:00
Colin Cross
d9d7be0617 Add core-lambda-stubs to classpath
Add core-lambda-stubs to the bootclasspath for modules with no
sdk_version or with sdk_version: "current", and to the classpath
for modules that specify a specific sdk_version number.

Fixes compiling modules with lambdas against the SDK.

Bug: 80428539
Test: java_test.go
Change-Id: I5e700f2dd86f1a6b84b7a55dd9bfe21a448d3fb6
2018-05-29 23:47:50 +00:00
Chih-Hung Hsieh
8681471e70 Handle pack_relocations in linker.cc
When pack_relocations is false and clang lld is used,
pass --pack-dyn-relocs=none to lld.

Bug: 80093890
Test: build and boot with USE_CLANG_LLD=true
Change-Id: I0ffe77a111d7fbab5afaa1395d09734a8a390e09
2018-05-29 15:39:47 -07:00
Sundong Ahn
1b92c824f3 Add aidl properties
The aidl files are allowed when creating the droiddoc module in
java_sdk_library. But The properties of AIDL, local_include_dir
and include_dir, are not passed to the droiddoc module.
These properties are add because they are needed to generate the
java files.

Bug: 77575606
Test: build && java_test.go
Change-Id: I1006c9ce7a5c7e424416d39fb921c27a3fa86afa
2018-05-29 04:25:02 +00:00
Dan Willemsen
4a789b1c3d Merge "Revert "Revert "Revert "Add path interposer"""" 2018-05-25 23:27:20 +00:00
Dan Willemsen
09f4540d66 Revert "Revert "Revert "Add path interposer"""
This reverts commit c59a92cb1a.

Reason for revert: tests are broken with long OUT_DIRs
They're directly calling net.Listen, and not using the fallback
for long socket names.

Change-Id: Id14cbd499fd9b36c6926b7552d3554340cb0916c
2018-05-25 23:26:00 +00:00
Treehugger Robot
516e580f94 Merge "droiddoc accepts aidl files as inputs" 2018-05-25 23:19:24 +00:00
Dan Willemsen
bfb2b7e877 Merge "Revert "Revert "Add path interposer""" 2018-05-25 22:57:59 +00:00
Treehugger Robot
523cef04cb Merge "Use new flex binary" 2018-05-25 22:44:35 +00:00
Dan Willemsen
c59a92cb1a Revert "Revert "Add path interposer""
This reverts commit 96c957ae20.

Fixes issues on some machines where the socket in TMPDIR ended up with a
unix domain socket pathname over 107 characters long, which Go will
reject due to underlying limitations in the system calls. If this
happens, we'll fall back to opening the directory, then using
/proc/self/fd/#/<file>, or manually creating a similar symlink in /tmp.

Also fixes some issues on Mac where os.Executable returns the symlink
instead of the underlying file, sending a message over a unix domain
socket will block if the reader isn't reading, and sandboxing was
preventing us from running `ps`.

Test: m blueprint_tools
Test: m blueprint_tools on mac
Change-Id: Ib19ccfe10cb0a79f1476fb1d5cd20ed0495be367
2018-05-25 14:07:00 -07:00
Treehugger Robot
c8036c17ab Merge changes from topic "recovery_available"
* changes:
  fix: recovery.cflags now works
  Mark as recovery_available:true
  Add recovery_available to cc_genrule
2018-05-25 05:58:01 +00:00
Colin Cross
9d0940c7a7 Merge changes I47b9def5,I16661701,I194aeeb8
* changes:
  Export manifest to Make
  Add support for android_test modules
  Reduce boilerplate around bpfix passes
2018-05-25 01:34:11 +00:00
Treehugger Robot
5ae3652d99 Merge changes from topic "preprocessed_ndk_headers"
* changes:
  Rename preprocessed_ndk_headers to versioned_ndk_headers.
  Add exclude_srcs property to ndk_headers modules.
  Fix typo. Properies -> Properties.
2018-05-24 23:47:57 +00:00
Jiyong Park
4a2dcb5c4b fix: recovery.cflags now works
There was a bug that recovery.cflags is ignored. Respect the property
when building for recovery.

Bug: 79146551
Test: m -j
Change-Id: I24c1c1b593c83eb1992721571c6d5c42483a41a0
2018-05-25 08:43:50 +09:00
Dan Willemsen
b7adae8aaf Use new flex binary
Test: treehugger
Change-Id: Ie1d41a3ee223a80b6f471b7b1cbede63cc7051f5
2018-05-24 15:45:21 -07:00
Colin Cross
10f7c4a268 Export manifest to Make
I5d439353d46ba6659ec8d16967693d2b9e62ab5a will need the manifests
from android libraries to merge into modules that reference them
with LOCAL_STATIC_ANDROID_LIBRARIES.

Bug: 3434784
Test: m checkbuild
Change-Id: I47b9def5b9c2ecc423550eb8a988cce96038a81e
2018-05-24 15:24:12 -07:00
Dan Albert
97f9c963ad Rename preprocessed_ndk_headers to versioned_ndk_headers.
The current rule runs a specific preprocessor over the source files,
and I'm adding support for generic preprocessed headers in a follow
up patch.

Test: make checkbuild
Bug: None
Change-Id: I1f3193cd595f151309e6321e1b41d8d16085379d
2018-05-24 15:12:51 -07:00
Dan Albert
19ff8b4662 Add exclude_srcs property to ndk_headers modules.
Test: make checkbuild
Bug: None
Change-Id: I2778c1140ab50abc0f7dee66da35ebacef77ea72
2018-05-24 15:12:26 -07:00
Dan Albert
7122205a5a Fix typo. Properies -> Properties.
Test: make checkbuild
Bug: None
Change-Id: I0b5e3dd44f507207f2de90e922dd7016cffce118
2018-05-24 15:12:20 -07:00
Colin Cross
ae5caf554c Add support for android_test modules
android_test module are APKs that can be run as tests, either
as standalone unit tests or as instrumentation tests for another
APK.

Test: m checkbuild
Change-Id: I16661701637e4048fd99442029c3e195ebf373a4
2018-05-24 14:53:58 -07:00
Colin Cross
e467f44f9b Reduce boilerplate around bpfix passes
Make it easier to add bpfix passes by putting them in a single
list.

Test: bpfix_test.go
Change-Id: I194aeeb88457800545d58aceb5d1616c6752274a
2018-05-24 14:53:58 -07:00
Treehugger Robot
c039ab084d Merge "Allow "-" to be part of Python file names" 2018-05-24 17:34:22 +00:00
Treehugger Robot
3332fdef7c Merge "Revert "Revert "Add libc++.so as install dependencies for hermetic Python.""" 2018-05-24 17:26:07 +00:00