Commit graph

8981 commits

Author SHA1 Message Date
Jiyong Park
c43e0ac0dd Add methods to get source file path and subdir of prebuilt_etc
The path and dir are used by apex to include prebuilt files in APEXs.

Bug: 112672359
Test: m apex.test
Change-Id: I780edc8f15e00e644c41fa2eb9dc73c25339c727
2018-10-05 14:13:50 +09:00
Dan Willemsen
7cadc1dd6a Merge "Switch perl to logging"
am: a1afb6e006

Change-Id: I30a2cd459823964a92dd76b10c3853a2c5bafa53
2018-10-04 21:08:26 -07:00
Treehugger Robot
a1afb6e006 Merge "Switch perl to logging" 2018-10-05 03:54:30 +00:00
Colin Cross
6cd3f89e3a Merge changes Ibf8af35f,I32edd26b,I981875bb
am: 886d45d8dd

Change-Id: I665abf19e63ffb77c2a431f064ed026f7c13f4d9
2018-10-04 17:32:20 -07:00
Colin Cross
886d45d8dd Merge changes Ibf8af35f,I32edd26b,I981875bb
* changes:
  Make prefer32 a lambda
  Clean up archMutator
  Make more java modules defaultable
2018-10-05 00:17:07 +00:00
Dan Willemsen
3eec9c57ca Switch perl to logging
To find the users and see if we can get rid of it.

Test: treehugger
Change-Id: I149f8daee6e21b35840ea1788de7f3e310eb5fba
2018-10-04 23:26:12 +00:00
Yi Kong
f8aad83fba Merge "Move libgcc to libcrt.builtins"
am: 1b9970727f

Change-Id: I6e52f504712dd2f5caa97eafd6018ac6f9f408f9
2018-10-04 15:25:09 -07:00
Yi Kong
1b9970727f Merge "Move libgcc to libcrt.builtins" 2018-10-04 22:09:55 +00:00
Inseob Kim
108be54c4e Add support for sysprop description files to Java
From now on, a java shared library can be built only with adding
".sysprop" description file to srcs. Sysprop library generator will
automatically generate a .java file, and soong will wrap it into .srcjar
file which will finally be contained in the java library. For the schema
of description file, see system/tools/sysprop/sysprop.proto.

Bug: 80125326
Test: 1) write a .sysprop description file.
2) create java_library and add description file to srcs.
3) create a test app, link against library of 2), and call generated
sysprop methods.
4) see compile succeeded.

Change-Id: I3ff87bc0a20f5a1aa126ef6d0f4d874a2ff4af8d
2018-10-04 19:39:35 +09:00
Yi Kong
77e62dbf59 Move libgcc to libcrt.builtins
libgcc is kept behind libcrt.builtins to provide unwinder symbols and
any other missing symbols.

libc and libm are excluded from the switch due to some symbols being
hidden in libcrt.builtins but not in libgcc. These will be addressed in
a separate CL.

Bug: 29275768
Test: checkbuild and bionic native tests on arm/arm64/x86/x86_64
Change-Id: Icc85bf88513e989a4b1547564405a22cf847db8a
2018-10-04 03:03:19 +00:00
Colin Cross
a9d8bee9f3 Make prefer32 a lambda
prefer32 needs to be set differently for app and native modules.
Make it use lambda provided by the module type instead of trying
to make archMutator figure it out.

Test: m checkbuild
Change-Id: Ibf8af35fdd3e1721725539d1f5452f4439d2125c
2018-10-03 14:31:10 -07:00
Colin Cross
5eca7cb229 Clean up archMutator
Use a variable for module.base() and separate the full list of
targets for the class from the filtered list of targets for the
module.

Test: m checkbuild
Change-Id: I32edd26bcbaff0baf433d0581f253b8a5c8b81f3
2018-10-03 14:31:10 -07:00
Colin Cross
48de9a4ef5 Make more java modules defaultable
Make java_import, android_library and android_library_import modules
defaultable, and add some missing property structs to java_defaults.
Also use InitJavaModule everywhere.

Test: m checkbuild
Change-Id: I981875bbec5d1f87bae73f36a385e0b77c56c368
2018-10-03 14:31:10 -07:00
Pirama Arumuga Nainar
b56f1e22a7 Remove --allow-multiple-definion linker flag for 64-bit Windows
am: b83de950e7

Change-Id: Iff346710722c019a059639b99fd61866833741e2
2018-10-03 14:03:08 -07:00
Pirama Arumuga Nainar
b83de950e7 Remove --allow-multiple-definion linker flag for 64-bit Windows
Bug: http://b/109759970

r335286 fixed this for 64-bit Windows.  This remains broken for 32-bit
Windows.

Test: m native-host-cross
Change-Id: I4d11b83d51db055406c6723aad89efd1b86b9b7b
2018-10-03 11:40:23 -07:00
Jiyong Park
1fa5a4b67a Merge "sdk_version <= 28 implies Java 1.8"
am: 0d7fd7f70a

Change-Id: Ibe9abb188abe86d10dc7f12801aafb60409c87c1
2018-10-03 07:53:11 -07:00
Treehugger Robot
0d7fd7f70a Merge "sdk_version <= 28 implies Java 1.8" 2018-10-03 14:41:02 +00:00
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
Colin Cross
938b4e8459 Merge "Add DevicePrefer32BitApps to Soong"
am: 72cf0a8479

Change-Id: I6a965857d74c0b3f18c6cc178e3059b5968a2313
2018-10-02 20:15:37 -07:00
Treehugger Robot
72cf0a8479 Merge "Add DevicePrefer32BitApps to Soong" 2018-10-03 03:05:08 +00:00
Nan Zhang
ce7f826f75 Merge "Use SoongJavacWrapper for javadoc"
am: be08f6b507

Change-Id: Iee3bf606fb2afea110d5ab1ed6d7afcde37b4798
2018-10-02 20:03:25 -07:00
Treehugger Robot
be08f6b507 Merge "Use SoongJavacWrapper for javadoc" 2018-10-03 01:57:54 +00:00
Nan Zhang
40b41b4038 Use SoongJavacWrapper for javadoc
Test: m -j docs; javac_wrapper_test
Bug: b/116874473
Change-Id: I51d440c815d3db1a0a5dc26ad4e376189dc0aefe
2018-10-02 16:45:37 -07:00
Colin Cross
6d827d044d Merge "Don't set targetSdkVersion to '1' for libraries"
am: 5b4a8eb854

Change-Id: I633c8170e5c36b7ffa91d7877d1545f6bad5e12d
2018-10-02 15:10:15 -07:00
Alex Light
f9a6b7e8f5 Merge "Don't include empty-string arguments in compile_commands.json"
am: c8b28a367d

Change-Id: Ibf6814ed3367b028a8ec31d255cb94c1dc7eef94
2018-10-02 15:09:05 -07:00
Treehugger Robot
5b4a8eb854 Merge "Don't set targetSdkVersion to '1' for libraries" 2018-10-02 22:04:28 +00:00
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