Commit graph

8276 commits

Author SHA1 Message Date
Jiyong Park
4584a8ac8e sdk_version <= 28 implies Java 1.8
When sdk_version is equal to or less than 28, java_version is implied to
1.8 unless it is explicitly specified. It was 26 originally, and is now
updated to 28 which is the most recent API version.

Bug: 117069453
Test: EXPERIMENTAL_USE_OPENJDK9=true make apex_aidl_interface
Change-Id: I18ebe3ec51ada54103f6d203b9bfae8ec6ea5d90
2018-10-03 18:05:04 +09:00
Christopher Ferris
946492f005 Merge "Add an isolated option for cc_test targets." 2018-10-01 23:07:31 +00:00
Colin Cross
16d387c970 Merge changes from topic "glob_escapes"
* changes:
  Use file glob for zipping classes*.dex files
  soong_zip: add --ignore_missing_files flag
  Add a --symlinks argument to soong_zip
  soong_zip: support globs in -f and -D arguments
2018-10-01 20:37:05 +00:00
Treehugger Robot
ecdcb52270 Merge "Soong: Add relativeFilePathFlag category in CMakeList generator" 2018-10-01 16:41:33 +00:00
Stephen Hines
ee15f2a7c7 Merge "Switch to clang-r339409." 2018-10-01 15:57:35 +00:00
Jack He
4a10b65fdc Soong: Add relativeFilePathFlag category in CMakeList generator
* Add relativeFilePathFlag compiler flag category whose format must be
  a=b/c/d, where "a" is the flag name and "b/c/d" is the flag value that
  is a relative path
* During CMake conversion, "b/c/d" will be prefixed with ANDROID_ROOT
  before being written to CMakeLists.txt

Bug: 112599284
Test: cd system/bt; mm -j40
      croot; make -j40

Change-Id: I4bb039678482201db60f0af97ab280d5028e0463
2018-10-01 07:59:54 -07:00
Dan Willemsen
2997123f73 Refactor Kati logic
Make the cleanspec & Android.mk runs of kati use much of the same code
and arguments.

Also renames 'Kati' to 'KatiBuild' in many cases, in the the expectation
that we'll have a 'KatiPackage' step in the future.

Use --no_ninja_prelude and move local_pool & _kati_always_build_ into
the combined ninja file. This will reduce the need to re-read makefiles
when Goma is enabled, and it allows us to include more than one
Kati-generated ninja file in the build graph.

Bug: 116968624
Test: build_test on downstream branches
Change-Id: Ibdac689b81f62dc293647fad917d84946f2c3cfa
2018-09-28 23:09:24 -07:00
Colin Cross
791399f1fd Use file glob for zipping classes*.dex files
Using a directory to zip the output of d8 and r8 was causing the
empty classes.dex.jar file in the output directory to get
zipped in.  Use a file glob instead so that it only picks up the
classes*.dex files even if classes.dex.jar already exists.

Test: m checkbuild
Change-Id: I1f3c1cbc23439fc52756aad027ab8cac10213d1d
2018-09-28 16:14:58 -07:00
Colin Cross
4be8f9e2a3 soong_zip: add --ignore_missing_files flag
soong_zip builds a list of files to zip early and then starts
zipping them all.  If a directory being zipped is concurrently
modified, a file that existed when soong_zip started may not
still exist.  Add a flag that continues when an expected file
does not exist.  Print a warning, since this should be rare
in normal usages but is a sign of a problem if it happens
regularly.

Test: zip_test.go
Test: m checkbuild
Test: m platform
Change-Id: I78426fe66fded8528ddd436c0f71a7442183cfeb
2018-09-28 16:14:52 -07:00
Colin Cross
09f11056f8 Add a --symlinks argument to soong_zip
Add a --symlinks argument that defaults to true to soong_zip.
Passing --symlinks=false will cause it to follow symlinks instead
of storing them in the zip file.

Relands I4deb98daa9d4ba9f94e3d7670c117fe00381d2ba with tests.

Bug: 112843624
Test: glob_test.go
Test: zip_test.go
Test: m checkbuild
Change-Id: I0eff9c1f2dba79e873fda381ff585df55d5aaaad
2018-09-28 14:01:33 -07:00
Colin Cross
1d98ee23a3 soong_zip: support globs in -f and -D arguments
-f and -D arguments can now take globs in the Soong format.

Also update the use of soong_zip that jars resources to escape the
globs in the arguments, and then shell-escape them when writing to
the rsp file so the glob escape are not intepreted by ReadRespFile.

Also remove an unused argument to the buildAAR rule that could
have contained values that needed escaping.

Relands I7f20bb169dc01f952d2a7681ec6ee9c05737ed37 with a fix for
trailing "\n" in list files, which causes a call to pathtools.Glob("")
that returns "./", which could then get incorrectly translated to
"../../../" in the zip file. Also adds tests.

Test: m checkbuild
Test: zip_test.go
Change-Id: I54b8eef9231875e6042a32c9f8bcc5c2f779922a
2018-09-28 14:01:29 -07:00
Colin Cross
05518bc13b soong_zip: Add tests
Add test that cover basic command line usage of soong_zip.  -D
is not covered yet as the implementation will be replaced with
one that is also more easily testable in the next patch.

Bug: 116751500
Test: zip_test.go
Change-Id: I5a1bcee74ebc9cb3cf332c36f89bc12c0e807ad2
2018-09-28 13:56:06 -07:00
Colin Cross
b051ab5cb5 soong_zip: move profiling from zip library to soong_zip
Profiling is only used by the standalone soong_zip command,
move it out of the shared zip library.

Bug: 116751500
Test: m checkbuild
Change-Id: I443c34fb39cf8955e163a7720d6f7ed585e4172a
2018-09-28 13:56:06 -07:00
Colin Cross
fe945b4401 soong_zip: move args parsing into zip.FileArgsBuilder
Add a builder that can construct []FileArg for zip.Run to use.
This will help writing tests that cover the command line parsing.

Test: later cl
Bug: 116751500
Change-Id: I15b5144f5094ab154f13de9c8a84b82db2da4e67
2018-09-28 13:56:06 -07:00
Treehugger Robot
e9b16159d5 Merge "Add phony targets for go binary modules" 2018-09-28 19:45:22 +00:00
Colin Cross
2465c3d998 Add phony targets for go binary modules
Add custom handling to androidmk.go for the bootstrap.GoBinaryTool
interface in order to create .PHONY targets for each tool written
in go.

Bug: 64539926
Test: m checkbuild
Test: m androidmk
Test: m multiproduct_kati
Change-Id: Ic65faa27a6ee4dfbd54ed6d208091db7c1d657a2
2018-09-28 10:25:45 -07:00
Colin Cross
6dab9bd57a Add dependencies on d8 and r8 library arguments
d8 and r8 were missing dependencies on jars passed as library
arguments.  This normally worked because the input jar is likely
to also depend on the same jars.  When the classpath was added
to d8 it started to fail on libraries that have no code but
include other static libraries.

Bug: 116840360
Test: rm out/soong/.intermediates/external/nist-sip/nist-sip/android_common/turbine-combined/nist-sip.jar && m out/soong/.intermediates/frameworks/base/ext/android_common/dex/ext.jar
Change-Id: Ie642f4a343b949778d8ee6dcc4511f3fd7633be1
2018-09-28 15:15:08 +00:00
Christopher Ferris
9df92d6438 Add an isolated option for cc_test targets.
Test: Built a test using the isolated flag.
Change-Id: I0fe51437a66e03dbfb4ffcfd3a04af094388c6bc
2018-09-27 22:23:13 -07:00
Logan Chien
f25112a70f Merge "Allow cc_prebuilt version suffix to include svn" 2018-09-28 01:24:24 +00:00
Treehugger Robot
dbc2962c42 Merge "TradeFed: Add "test_config_template" flag in Android.bp" 2018-09-28 00:29:04 +00:00
Treehugger Robot
dfe02f5dc8 Merge "Pass classpath to d8" 2018-09-27 23:27:45 +00:00
Colin Cross
fc2aac5c71 Merge "Allow cc_object modules to use STL" 2018-09-27 23:23:19 +00:00
Nan Zhang
8202ad2f9a Merge "Fix invalid memory error for python binary build" 2018-09-27 20:31:40 +00:00
Colin Cross
907769f0fb Allow cc_object modules to use STL
cc_object modules may need access to the STL headers.

Test: m checkbuild
Change-Id: I88ad556a349d9530d24949f05eebf8b6fab4c62a
2018-09-27 18:06:23 +00:00
Colin Cross
ffb657ebc0 Pass classpath to d8
d8 requires the full classpath if --min-api requires default method
or try-with-resources desugaring.  Always pass the full classpath,
since it will already have been built to generate the input jar.

Bug: 116243313
Test: m checkbuild
Change-Id: Ib0c18873880697b7cf942e0548dd2c53ee5ad23c
2018-09-27 11:05:09 -07:00
Neil Fuller
daf5ec0c28 Merge "Allow conscrypt to depend on core.intra.stubs" 2018-09-27 10:59:53 +00:00
Jack He
3333889da5 TradeFed: Add "test_config_template" flag in Android.bp
* Allow module owner to specify a test_config_template in Android.bp
* The rule goes:
  1. When "test_config" is set, Soong uses specified test config
  2. If 1 is not true, check if "AndroidTest.xml" exist in the
     directory, if so, use "AndroidTest.xml
  3. If 1 and 2 are not true, check if "test_config_template" is set.
     If so, use module specific template to generate test config
  4. Otherwise, use Soong default template for test config for autogen

Bug: 113359343
Test: make
Change-Id: I9fb4b2b266be9e0c7cf23da4a51e1c8ae67cd857
2018-09-26 18:02:55 -07:00
Nan Zhang
cba97e69ab Fix invalid memory error for python binary build
The root cause is we didn't check if the optionalpath is valid or not,
the registerbuildation function directly invoke the path var and
cause the invalid memory error. We just return if the launcher doesn't
exist.

The ctx.VisitDirectDepsWithTag() also handles allowmissingdependency so
we are ok if launcher doesn't exist.

Test: N/A
Bug: b/116698229, b/67510844
Change-Id: I40941079a64d7797ab879fc5edaa29e835b493a0
2018-09-26 16:57:24 -07:00
Treehugger Robot
82db9f9f69 Merge "Fixed the link to go/Android.bp" 2018-09-26 23:44:47 +00:00
Colin Cross
ce6b038a55 Merge changes from topic "glob_escapes"
* changes:
  Revert "soong_zip: support globs in -f and -D arguments"
  Revert "Add a --symlinks argument to soong_zip"
2018-09-26 21:38:19 +00:00
Colin Cross
7f33b81ef6 Revert "soong_zip: support globs in -f and -D arguments"
This reverts commit 08e28abc4e.

Reason for revert: inserts extra ../../ entries in the zip file.

Bug: 116737386
Change-Id: I048f94889a66fe618058e37a5827d0cf6b1a6b68
2018-09-26 21:38:07 +00:00
Treehugger Robot
c736cda13f Merge "Add OWNERS to finder's cache" 2018-09-26 21:37:54 +00:00
Colin Cross
c7feeff1e9 Revert "Add a --symlinks argument to soong_zip"
This reverts commit d59dab94c4.

Bug: 112843624
Change-Id: I3d0f1b61e899b162e65c18662f9d27dd794a9a30
2018-09-26 21:36:44 +00:00
Stephen Hines
c91ab9eb6d Switch to clang-r339409.
This also changes over llvm-strip to use the -o flag, rather than
relying on nonstandard (and no longer functional) positional arguments.

Bug: http://b/111998531
Test: Multiple new builds. For googlers - http://go/clang-r339409-testing
Change-Id: I8c82d06304af24a001e6552e36e2f540d8e364ce
2018-09-26 21:15:08 +00:00
Treehugger Robot
e12f5e23c2 Merge "GccCppStdVersion should not be needed anymore" 2018-09-26 20:19:01 +00:00
Colin Cross
60b0360c3b Merge "Add a --symlinks argument to soong_zip" 2018-09-26 20:17:49 +00:00
Colin Cross
f9641687f5 Merge "soong_zip: support globs in -f and -D arguments" 2018-09-26 17:52:45 +00:00
Neil Fuller
cf157ccb16 Allow conscrypt to depend on core.intra.stubs
conscrypt is built against an API surface we define
in libcore as core.intra.stubs. Therefore we need
an exception to the libcore dependency rules.

Bug: 113148576
Bug: 110404540
Test: make conscrypt
Change-Id: If36e05b2d8339741393752bd864bdb5d6c0f503e
2018-09-26 16:19:46 +01:00
Logan Chien
e4d5a6c486 Allow cc_prebuilt version suffix to include svn
This commit allows cc_prebuilt version suffix to include `svn`, e.g.
`libclang.so.8svn`.  The rationale behind this commit is that latest
LLVM/Clang prebuilt binaries use `.8svn` as the version suffix.

Bug: 111579848
Test: header-abi-dumper builds with the latest binaries
Change-Id: I91594c5d8bc57605e2e0facb0a867dc4a4a17fe6
2018-09-26 10:59:56 +08:00
Colin Cross
7692bf2468 Merge "Update soong for ShouldFollowSymlinks argument to pathtools.Glob" 2018-09-25 23:57:46 +00:00
Treehugger Robot
e67a74b088 Merge "Add --proguard option to metalava" 2018-09-25 22:41:34 +00:00
Pirama Arumuga Nainar
43cfe82174 GccCppStdVersion should not be needed anymore
Test: Build
Change-Id: I2cd16deed269fb40a59754dec94b376383346bf0
2018-09-25 21:27:45 +00:00
Treehugger Robot
0d565c1afa Merge "Disable performance-noexcept-move-constructor check." 2018-09-25 21:10:20 +00:00
Nan Zhang
199645cd76 Add --proguard option to metalava
Also clean-up properties comments

Test: m -j docs
Bug: b/78245848
Change-Id: I43899e9841e0d29e5be7ab2b393cc78186970231
2018-09-25 14:10:00 -07:00
Chih-Hung Hsieh
1b5470afe1 Disable performance-noexcept-move-constructor check.
This reduces amount of warnings in default builds,
until we add noexcept to those move constructors.

Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: Iaa9e9480dbc72a7370ccbe10ed232b87dc8d6184
2018-09-25 20:25:57 +00:00
Nan Zhang
5994b620f2 Add no_standard_libs property to droidstubs
mainline-modules need this support to strip default libs.

Test: N/A
Bug: b/78245848
Change-Id: I8605019a55dd8f724c863ddaa705b72f461a7cb2
2018-09-25 17:02:10 +00:00
Richard Fung
3013361546 Merge "Add support for cortex-a72" 2018-09-25 15:27:38 +00:00
Pete Gillin
77167904e1 Add droidstubs support for merging show/hide annotations.
This works like the existing annotation merging support, but uses a
different flag, because the merging needs to happen earlier in
metalava (see the other change in this topic).

Bug: 115746226
Test: `make api-stubs-docs`
Test: `make core-platform-api-stubs` with local modifications to trigger this path
Change-Id: I30d6d7993e06b105fb3e9fcefde39c1bf3da998a
2018-09-25 12:37:38 +01:00
Ilya Matyukhin
699e3b88f8 Fixed the link to go/Android.bp
Change-Id: Ia14b1a5b1f96c3a70465eb1c34367deb5c1d4234
2018-09-24 18:35:50 -07:00
Richard Fung
eb37ed3832 Add support for cortex-a72
Bug: 113346253
Test: lunch cheets_arm64-eng; m
Change-Id: I02dd1cfe75f97767eac7424d472ff643987c276b
2018-09-24 16:33:45 -07:00