Commit graph

8644 commits

Author SHA1 Message Date
Treehugger Robot
c8b28a367d Merge "Don't include empty-string arguments in compile_commands.json" 2018-10-02 21:59:23 +00:00
Colin Cross
9519ec27a0 Merge "Fix double space in include argument"
am: a112b514e7

Change-Id: Id602abf9429649b53db37bdb73a8af318628a1f8
2018-10-02 14:54:27 -07:00
Treehugger Robot
a112b514e7 Merge "Fix double space in include argument" 2018-10-02 21:12:40 +00:00
Colin Cross
88da24e578 Add DevicePrefer32BitApps to Soong
Bug: 80095087
Test: m checkbuild
Change-Id: Ia2b2435492198ad646cbf7c59c6af59d381b20a5
2018-10-02 20:12:50 +00:00
Colin Cross
4b176069c3 Don't set targetSdkVersion to '1' for libraries
Setting targetSdkVersion to '1' causes ManifestMerger to add
implicit permissions when merging to a higher targetSdkVersion.
It should really be unset, but ManifestMerger treats unset
targetSdkVersion as 'Q' if minSdkVersion is 'Q' (but not if
minSdkVersion is '28').  Set it to something low so that it
will be overriden by the main manifest, but high enough that
it doesn't cause implicit permissions grants.

Bug: 115415671
Bug: 117122200
Test: m checkbuild
Change-Id: I1d2d031a21314f6b55d8ea1cc7c4c8e3ecae7f06
2018-10-02 12:39:38 -07:00
Alex Light
0c7cc1caa1 Don't include empty-string arguments in compile_commands.json
compdb.go was incorrectly splitting compiler arguments. This could
cause empty strings to be included in compile_commands.json,
potentially confusing tools.

Bug: 117124308
Test: m checkbuild
Test: m SOONG_GEN_COMPDB=1 \
        SOONG_GEN_COMPDB_DEBUG=1 \
        SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
      Examine $ANDROID_BUILD_TOP/compile_commands.json
Change-Id: I375baf255c50a1329cd644ac584d200aba9daa69
2018-10-02 11:28:25 -07:00
Colin Cross
06080f4137 Fix double space in include argument
The double space is confusing compdb.go.  compdb.go should be fixed,
but the double space is unnecessary so remove it.

Also make -isystem consistently followed by a space.

Bug: 117124308
Test: m checkbuild
Change-Id: I5ce7530d2ef66be8d8285e252d60a39299984a06
2018-10-02 11:16:56 -07:00
Christopher Ferris
8cea552a38 Merge "Add an isolated option for cc_test targets."
am: 946492f005

Change-Id: Ida02678de02acfe1f619217e814b2d99ac5c035d
2018-10-01 16:37:02 -07:00
Christopher Ferris
946492f005 Merge "Add an isolated option for cc_test targets." 2018-10-01 23:07:31 +00:00
Colin Cross
ed22cd8f90 Merge changes from topic "glob_escapes"
am: 16d387c970

Change-Id: Iabb76941f21c49720a0f99e9f9884e87c8094d40
2018-10-01 13:59:30 -07: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
Jack He
7ea77bf1ed Merge "Soong: Add relativeFilePathFlag category in CMakeList generator"
am: ecdcb52270

Change-Id: Iaf6a53445fa8d78b785d89cfafdcf56f2759601d
2018-10-01 09:49:22 -07:00
Treehugger Robot
ecdcb52270 Merge "Soong: Add relativeFilePathFlag category in CMakeList generator" 2018-10-01 16:41:33 +00:00
Stephen Hines
f4fe6300e6 Merge "Switch to clang-r339409."
am: ee15f2a7c7

Change-Id: Ic7de9d629900ce71315029a82f32a89a11c730be
2018-10-01 09:20:41 -07: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
80ae13c628 Refactor Kati logic
am: 2997123f73

Change-Id: Ic1ae1980840edc308106d3d4d8c80204fd571a75
2018-09-29 09:49:55 -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
d843c25e24 soong_zip: Add tests
am: 05518bc13b

Change-Id: I08bd473131439f46a962f3b33dc387806362cbfb
2018-09-28 17:32:51 -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
6d278b7bbf soong_zip: move profiling from zip library to soong_zip
am: b051ab5cb5

Change-Id: I530eb552c3b1628464c512b356c28a23cae2f95a
2018-09-28 14:50:21 -07:00
Colin Cross
b9d87cf1fb soong_zip: move args parsing into zip.FileArgsBuilder
am: fe945b4401

Change-Id: Iaaa76939edba78e7d979bd050963e158bb8ab915
2018-09-28 14:50:12 -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
Colin Cross
258f3e002c Merge "Add phony targets for go binary modules"
am: e9b16159d5

Change-Id: Ia668598a70c2194c8bd065be37ad8abc7fff5005
2018-09-28 12:50:41 -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
c48d4e2355 Add dependencies on d8 and r8 library arguments
am: 6dab9bd57a

Change-Id: I95f5b4795ca21232d2838c53c27bbfb6b358bf11
2018-09-28 10:21:54 -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
018fe90276 Merge "Allow cc_prebuilt version suffix to include svn"
am: f25112a70f

Change-Id: Ie85611438fc874748c4375cc1d0e5f4e277cbf9c
2018-09-27 18:32:24 -07:00
Logan Chien
f25112a70f Merge "Allow cc_prebuilt version suffix to include svn" 2018-09-28 01:24:24 +00:00
Jack He
4466656211 Merge "TradeFed: Add "test_config_template" flag in Android.bp"
am: dbc2962c42

Change-Id: If22f6b2b252be0ae724763b1a971777706edf6fb
2018-09-27 17:43:57 -07:00
Treehugger Robot
dbc2962c42 Merge "TradeFed: Add "test_config_template" flag in Android.bp" 2018-09-28 00:29:04 +00:00
Colin Cross
f334701059 Merge "Pass classpath to d8"
am: dfe02f5dc8

Change-Id: I0898c3e478125871ead02df067292847d091865a
2018-09-27 16:38:01 -07:00
Treehugger Robot
dfe02f5dc8 Merge "Pass classpath to d8" 2018-09-27 23:27:45 +00:00
Colin Cross
df61e69f74 Merge "Allow cc_object modules to use STL"
am: fc2aac5c71

Change-Id: Ied45fa5fe78e00b13345359ed582ab1db6d6a28e
2018-09-27 16:25:32 -07:00
Colin Cross
fc2aac5c71 Merge "Allow cc_object modules to use STL" 2018-09-27 23:23:19 +00:00
Nan Zhang
a91b49d2b0 Merge "Fix invalid memory error for python binary build"
am: 8202ad2f9a

Change-Id: If734ff272b9913669e974f9c96ff717110afc616
2018-09-27 13:46:42 -07: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
64f1170c18 Merge "Allow conscrypt to depend on core.intra.stubs"
am: daf5ec0c28

Change-Id: Ibc09870fd9e184979b7dd2c8607b5dc1ded66914
2018-09-27 04:10:15 -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
Ilya Matyukhin
f7e747b837 Merge "Fixed the link to go/Android.bp"
am: 82db9f9f69

Change-Id: I10772c5b9c3fd8b0333e33607f463abb96b266f0
2018-09-26 16:59:44 -07:00