Commit graph

5754 commits

Author SHA1 Message Date
Colin Cross
924a0aa7d5 Update turbine command line flags
The latest version of turbine requires a -- after the javac
options, and uses multiple --bootclasspath arguments instead
of a javac-style colon separated list.

Test: m javac-check
Bug: 74339924
Change-Id: Ib7096294a43e9bd30abc36751299bfac7879f765
2018-03-13 22:22:49 -07:00
Dan Willemsen
a052599bb6 Remove obsolete Brillo variable
Test: none
Change-Id: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
2018-03-10 15:29:03 -08:00
Treehugger Robot
9c6bc37da1 Merge "Use xz prebuilt" 2018-03-10 03:00:29 +00:00
Treehugger Robot
8b00247b66 Merge "Remove timestamp based filelist file for tracking Python dependencies" 2018-03-10 00:42:37 +00:00
Treehugger Robot
0b9be36339 Merge "Fetch generated srcs from java libs for droiddoc." 2018-03-09 22:33:27 +00:00
Nan Zhang
1db85407aa Remove timestamp based filelist file for tracking Python dependencies
Each Python module will generate a zip file containing source & data
files. The Python binary will collect all its dependencies and use
merge_zips to merge each zip file to create a final .par file.

Test: m -j checkbuild && real examples:
Bug: b/70568913

Change-Id: I9ff232d461d33e1c06026e7dcb5b124bf02c3ce5
2018-03-09 14:12:48 -08:00
Treehugger Robot
19e62e5ebf Merge "Revert "Fix absolute paths in clang debug output"" 2018-03-09 20:59:33 +00:00
Nan Zhang
b2b33de3c0 Fetch generated srcs from java libs for droiddoc.
api-stubs, system-api-stubs and etc need generated sources and srcjars from "framework",
so add a property that tell module to fetch srcs and srcjars from its
dependency libraries. The libraries in that property has to be in the
module's classpath.

Also add doc_defaults targets.

Bug: b/70351683
Test: m -j
Change-Id: I05831fbcad488037710950e4f05dc8fb2a12f403
2018-03-09 10:53:42 -08:00
Dan Willemsen
8fec83a8b9 Use xz prebuilt
Instead of whichever xz happens to be on the PATH.

Bug: 36130900
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: Ic9b66062ca7947f0eca9d839c0864da492d4ef71
2018-03-09 10:53:26 -08:00
Pirama Arumuga Nainar
8aed42c798 Use a versioned profile file if available
Bug: http://b/74395273

Update profile-search logic to look for profile files named
<profile_file>.<arbitrary-version> in the profileProject and use that if
available.  This works around an issue where ccache serves stale cache
entries when the profile file has changed.

Test: touch toolchain/pgo-profiles/art/dex2oat.profdata.foo and check it
gets used.

Change-Id: I3de095c263b952cede25af7d0b63dc7280914d76
2018-03-09 16:05:54 +00:00
Treehugger Robot
e9b02776f4 Merge "Rename stubsjar to stubsSrcjar for droiddoc" 2018-03-09 09:42:29 +00:00
Logan Chien
5a8d428dc7 Merge changes I9bec563c,I34f06abd
* changes:
  RemoveFromList() should remove all matches
  Add unit tests for android/util.go
2018-03-09 08:23:08 +00:00
Logan Chien
7922ab8da6 RemoveFromList() should remove all matches
RemoveFromList() should remove all matches.  Before this commit,
RemoveFromList() only removes the first match.  This commit rewrites
RemoveFromList() so that it will remove all matches.  Besides, a unit
test is written.

Note: aosp/461936 wants to make sure libc.so precedes libdl.so in
DT_NEEDED entries.  However, if there are two "libdl" in shared_libs,
aosp/461936 won't achieve its goal because RemoveFromList() (prior to
this commit) only removes the first "libdl".

Bug: 62815515
Test: Build sailfish and check libstagefright.so
Change-Id: I9bec563cbf800bff4bd508fb21e28869a92cfe56
2018-03-09 13:41:56 +08:00
Dan Willemsen
32a669b01b Use our own TMPDIR
Some people have run into issues where /tmp is on a smaller partition
than their main source tree, and if it fills up (or only has a few GB
free), their builds can start failing.

There may also be a subset of people whose /tmp may be slower than their
out directory -- if they put their src and out trees on a SSD, but keep
/tmp on a spinning HDD.

Bug: 71755844
Test: check out/soong.log for TMPDIR
Test: do a build, watch out/soong/.temp
Change-Id: Ib749ec736ad0f6c8ce7453861a91b3e99ddbd92d
2018-03-08 19:42:00 -08:00
Treehugger Robot
0343d020b3 Merge "Use turbine's native source jar support" 2018-03-09 03:35:22 +00:00
Jayant Chowdhary
7ebe5d10ad Merge "Consider binder bitness while looking for abi references." 2018-03-09 03:11:01 +00:00
Logan Chien
5e877b1a86 Add unit tests for android/util.go
Bug: 62815515
Test: lunch aosp_sailfish-userdebug && make   # runs soong unit tests
Change-Id: I34f06abdc78bfb28af3b5250491bbcddb7595c9b
2018-03-09 10:44:14 +08:00
Nan Zhang
ccff0f78ba Rename stubsjar to stubsSrcjar for droiddoc
Test: m -j core-docs
Bug: b/70351683
Change-Id: I65f310d68a5a940fe88ccce4a22110548c15c306
2018-03-08 17:29:32 -08:00
Dan Willemsen
8054f0a9d2 Revert "Fix absolute paths in clang debug output"
This reverts commit 253cab89ee. It is no
longer necessary.

Bug: 36463318
Bug: 72408185
Test: compare output directories after `m libc`
Test: compare treehugger output files
Change-Id: Ib5d7bbc13fa6f547e658247559153c61387e3604
2018-03-08 17:10:54 -08:00
Jayant Chowdhary
34ce67d454 Consider binder bitness while looking for abi references.
Binder bitness does not always correlate directly with primary arch, as
assumed earlier. For example: it is possible to have devices with
primary arch 'arm' and use 64 bit binder.

Bug: 74362434

Test: utils/create_reference_dumps.py;
      m -j vndk_package for aosp_arm64_ab, aosp_arm_ab invokes
      header-abi-diff on both arm and arm64 arches.

Test: mm -j64 in system/libhwbinder on troublesome internal target.

Change-Id: Iea0a24b57cdb3033e25b6fe126c5d5d717f45b4e
2018-03-08 16:49:59 -08:00
Dan Willemsen
6424d17a2d Allow proto properties in cc/java_defaults
Test: Add proto.canonical_path_from_root: true in a cc_defaults
Test: Add proto.canonical_path_from_root: true in a java_defaults
Change-Id: I9ddfc8af0025705a34b6e487225f1f98915054c3
2018-03-08 13:34:34 -08:00
Ivan Lozano
f7463f8dd2 Merge "Add minimal-runtime support for integer overflows." 2018-03-08 20:12:10 +00:00
Stephen Hines
5e33119d5e Switch back to clang-4639204.
Bug: http://b/68397894
Test: build/run sailfish.
2018-03-08 01:28:34 -08:00
Stephen Hines
a6d69b06f8 Revert "Switch to clang-4639204."
This reverts commit d4bc55624a.

Reason for revert: PGO + LTO is broken with the new toolchain.

Change-Id: I5b84d933746a8facd536167c2b040fb08302790b
2018-03-08 06:24:11 +00:00
Ivan Lozano
30c5db2f47 Add minimal-runtime support for integer overflows.
Adds Soong support for -fsanitze-minimal-runtime when using
the integer overflow sanitizers. This makes the crashes due to these
sanitizers less mysterious.

Bug: 64091660
Test: Compiled and checked the generated compiler commands
Test: Checked program that overflows for the abort reason

Change-Id: Ieeceaf6c35c8371592952d3b8b977aefc11601c5
2018-03-07 18:41:20 -08:00
Stephen Hines
d4bc55624a Switch to clang-4639204.
Bug: http://b/68397894
Test: build/run sailfish.
Change-Id: I980cf8458651317b33197253d0b870e66e936d05
2018-03-07 15:36:24 -08:00
Colin Cross
6981f658ef Use turbine's native source jar support
Turbine doesn't need extract_srcjars.sh, just pass the source jars
with --source_jars.

Bug: 74339924
Test: m checkbuild
Change-Id: Ie7fe06f5a9f5e29287cf79c2d46b23a676a03d41
2018-03-07 15:14:50 -08:00
Treehugger Robot
b1693d3bde Merge "Handle Scanner errors in kati output filter" 2018-03-07 17:45:22 +00:00
Dan Willemsen
d9429e6ff2 Handle Scanner errors in kati output filter
If Kati ever wrote a line over 64k characters, the scanner in soong_ui
would error, and Kati would hang trying to write into the pipe. Now if
the Scanner errors out, fall back to copying directly from the pipe to
the output.

Test: Add $(warning $(shell find frameworks)), does not hang
Change-Id: I86412ad2f53f2fe3cbda901ee673abb904d56d3c
2018-03-06 22:08:27 -08:00
Treehugger Robot
72ce0643b0 Merge "No abi diffing for vndk libraries which are not vendor available." 2018-03-07 01:46:17 +00:00
Treehugger Robot
984285de31 Merge "droiddoc supports no_framework_libs." 2018-03-06 23:10:22 +00:00
Jayant Chowdhary
22963cda0e No abi diffing for vndk libraries which are not vendor available.
Vendor binaries cannot directly link with vndk libraries which are not vendor
available. We don't need them to be abi stable.

Bug: 66301104

Test: cd external/cblas; touch src/cblas_cher.c; mm -j64 does not
      produce an lsdump for libblas, since it isn't vendor available,
      even though it is vndk_enabled: true.

Change-Id: Ib2e1eaa06c4dc2e05623bd7b9aa3a83010f76bd1
2018-03-06 15:01:27 -08:00
Colin Cross
300f038848 Only add SDK file dependencies on device builds
Dependencies on sdk_vcurrent, etc. should only be added to java
modules that are building for the device.

Test: aosp-build-tools build
Change-Id: I01abba94fed8b470085529092263f4634dec229c
2018-03-06 21:32:32 +00:00
Nan Zhang
e66c727392 droiddoc supports no_framework_libs.
follow: https://android-review.googlesource.com/c/platform/build/+/618046

Don't build agianst framwork libs when "no_framwork_libs" set to true.

Test: m -j
Bug: b/70351683
Change-Id: If6d37fac20c2b401aa30c31c14f1463300623a0e
2018-03-06 12:59:27 -08:00
Przemyslaw Szczepaniak
fd4795f58c Merge "Pass bootclasspath to kotlinc" 2018-03-06 10:10:40 +00:00
Pirama Arumuga Nainar
f975865a12 Merge "Switch to clang-4630689" 2018-03-05 17:57:38 +00:00
Przemyslaw Szczepaniak
e3d26bf978 Pass bootclasspath to kotlinc
Lack of bootclasspath causes lack of libcore classes when compiling
code that would run on a device.

Bug: 73281388
Test: make hidl-doc
Change-Id: I2172740c4e318a7e24d0a40d967ccc91b7226338
2018-03-05 16:06:42 +00:00
Treehugger Robot
83a495830b Merge changes I6f7d40b7,I25654032
* changes:
  add a library to report build numbers without causing rebuilds
  Rewrite symbol_inject to be testable
2018-03-03 03:16:48 +00:00
Colin Cross
86803cfe6e add a library to report build numbers without causing rebuilds
Allow native modules to specify use_version_lib, which will make
an android::build::GetBuildNumber() function available.  For host
builds, the function will return the build number at the time that
the module was linked.  For device modules it will return the
value of the ro.build.version.incremental property.

Bug: 71719137
Test: build_version_test
Test: m build_version_test && touch build/make/core/Makefile build/soong/cc/libbuildversion/tests/build_version_test.cpp && m build_version_test shows different build numbers for binary and library tests.
Change-Id: I6f7d40b7574bb8206866c4e39bad9c710c796e32
2018-03-02 16:55:51 -08:00
Colin Cross
8673b5b959 Rewrite symbol_inject to be testable
Parse the machine-specific symbol tables into a custom symbol table
object and use a single function to find the offset and size of the
symbol in the custom table.  Make the functions to convert a
machine-specific symbol table into the custom table also take mocks,
and provide functions to dump mocks from real files.  Add tests
that take the mocks and verify they produce the right offset and
size.

Test: cmd/symbol_inject/*_test.go
Change-Id: I25654032b5017dd13a9a1fe29f8b8826ce5bc82b
2018-03-02 16:47:13 -08:00
Jayant Chowdhary
ea0a2e1928 Disable abi diffs for sanitized variants of modules.
asan variants can sometimes have extra exported symbols (this is a vndk
extension violation). Since asan variants are only used for testing,
don't do abi diffs for them.

Bug: 66301104

Test: Without the change, libc++.so.lsdump exists for the asan variant;
      with the change, it does not.

Test: make -j64.

Change-Id: I61a4c7a3e9aa0028a54ad0ca8715e8c77aebad94
2018-03-02 22:13:15 +00:00
Pirama Arumuga Nainar
4a825ee14a Switch to clang-4630689
Bug: http://b/73127367
Bug: http://b/68659946

These new prebuilts have fixes for the bugs mentioned above.

Test: Build and verify that issues in both bugs above are fixed.
Change-Id: I410a43b70920d509118f8e6fdb012ef6b078d657
2018-03-02 13:38:42 -08:00
Jayant Chowdhary
dcd33b6c29 Create a make variable for all lsdump files.
This is needed so that we can embed the paths of lsdump files in a file,
in order to make lookup faster, while creating reference dumps.

Test: mm -j64 in external/libjpeg-turbo for aosp_arm64_ab;
      out/soong/make_vars-aosp_arm64_ab.mk contains
      SOONG_LSDUMP_PATHS := <list of lsdump paths>

Change-Id: I04608429e1add307cc1ee79d2f0c348fb041613c
2018-03-01 17:19:25 -08:00
Jayant Chowdhary
ac066c6b90 For abi diffing, factor in arch variant and primary arch.
binder_size_t has a different size for builds with different primary
arches.

Also maintain seperate reference dumps for different arch variants,
since different cflags may be legally specified for them (similar to
what GSI does)

Test: create reference dump for libjpeg at
      prebuilts/abi-dumps/vndk/current/arm64/arm64_armv8-a/source-based/libjpeg.so.lsdump.gz
      mm -j64; header-abi-diff gets invoked.

Change-Id: I55eae4d4811c9754fe8dbd1009c7929fea119eeb
2018-03-01 17:19:25 -08:00
Dan Willemsen
540a78c1ce Turn GlobFiles into a Glob for files, use it
GlobFiles had allowed results to be anywhere in the source tree,
restrict it to results within the current module directory.

Then use it for ExpandSources and other places where we only want files.
This fixes using '*' in cc_test's `data` property, which can only
support files.

The only thing this changes today is that java_resource_dirs and
java_resources no longer pass directories to soong_zip's -f argument.
core-libart previously added some icu directories, now it only passes
files.

Bug: 71906438
Test: only expected changes in out/soong/build.ninja
Test: add data: ["**/*"] to a cc_test, build successfully
Change-Id: Iff1bd8c005a48e431c740706d7e23f4f957d8b1d
2018-03-01 14:05:20 -08:00
Dan Willemsen
f6366cc0a1 Merge "Add droiddoc_template" 2018-03-01 17:53:25 +00:00
Jeff Gaston
491ace3c0a Merge "Remove unused property" 2018-03-01 16:14:03 +00:00
Treehugger Robot
8d43b7cf81 Merge "Fix finding next symbol when multiple symbols have the same address" 2018-03-01 05:15:42 +00:00
Dan Willemsen
cc09097359 Add droiddoc_template
We prefer not to use absolute paths in modules, but to reference modules
that have associated paths. This a few benefits:

* it's easier to move a module than to update all the references
* if the module doesn't exist, we treat it as a normal missing
dependency, not having to deal with the missing dependency in path.go
* implementing visibility(etc) in the future would be simpler if there
was a module attached to the reference, so we don't have to do various
path-based lookups to try and match things up.

So define a `droiddoc_template` module, which takes a path, and will run
the glob once in that module. All of the `droiddoc` modules can then
specify it through the `custom_template` property, which will pull the
necessary data.

Also fix that htmldirs should be references from the local path, the
htmldir2 argument never being specified, and complain if more than two
htmldirs are specified, or if the custom template isn't specified.

Test: m core-docs
Test: out/soong/build.ninja is nearly identical
      - line numbers in comments
      - adds directories to droiddoc template dependency lists, which
        is more correct, since we need to rerun on added or removed
	files too.
Change-Id: Iff630bddb3818b8eeed439de7e41fc7fbe7cdcb0
2018-03-01 02:10:51 +00:00
Nan Zhang
3bb14200e2 Change name of droiddoc target output to *-stubs.srcjar
Test: m -j core-docs
Bug: b/70351683
Change-Id: If8c00a9992d262b7cd4c95794073591dcc245bd2
2018-02-28 16:15:05 -08:00