Commit Graph

8775 Commits

Author SHA1 Message Date
Tobias Thierer 06dd04f20e Enable Java 9 language support through java_version: "1.9" alone.
Some logic in java.go was conditional on TargetOpenJDK9(), which in
turn relies on a global build flag (EXPERIMENTAL_USE_OPENJDK9=true).
This CL changes the logic in collectBuilderFlags() to check for
javaVersion greater or equal "1.9" instead, which is true when either
EXPERIMENTAL_USE_OPENJDK9=true (global) or javaVersion "1.9" (a
per-build target attribute).

Because the value of flags.javaVersion isn't available there,
TargetOpenJDK9()-dependent logic in Module.deps() was changed to
be unconditional; as far as I understand, this means that system
modules deps will be built regardless of whether they're needed
later in the build. This will probably slow down the build
unnecessarily until the first user of these system modules appears
(expected soon), but probably not by much.

There is some TargetOpenJDK9() related logic remaining in droiddoc.go,
but this doesn't seem to break the build of Java 9 language sources
and is probably no longer needed now that metalava is used for
generating the stubs (thanks to Nan!), and those do not contain any
Java 9 language features.

Bug: 112443425
Test: Checked that Java 9 language support works on AOSP after
      this CL without a need for EXPERIMENTAL_USE_OPENJDK9=true,
      ie. after also patching CL http://r.android.com/646840 ,
      "make docs droid cts" completes, the device boots and
      Java9LanguageFeaturesTest passes.

Change-Id: I393b97a7b3bb4c1c3d06580c639e94ff6cf916ff
2018-09-11 19:54:28 +01:00
Colin Cross b60190a4f8 Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.

Relands If9008c50920779048480f5eeeb0084f26006c998 with fixes for
mac builds.

Bug: 113936524
Test: m checkbuild
Change-Id: I9710ff57f0793f36eb889eabd08bd60a365a88dd
2018-09-10 23:12:12 -07:00
Colin Cross b496cfd9d2 Enable toc support for Darwin and Windows
Bug: 113936524
Test: m checkbuild
Change-Id: I0f2030ad75daae2cbe44e8cbedad329d33df55f7
2018-09-10 23:12:11 -07:00
Dan Willemsen 84fc41083f Merge "Default BUILD_BROKEN_PHONY_TARGETS to false"
am: bd4e9cc42a

Change-Id: I226585bb23c1b2cec16b354043ac9d8080a396bd
2018-09-10 18:58:00 -07:00
Treehugger Robot bd4e9cc42a Merge "Default BUILD_BROKEN_PHONY_TARGETS to false" 2018-09-11 01:50:02 +00:00
Colin Cross 6d54d291c8 Make manifest_fixer.py keep targetSdkVersion high with min_sdk_version
am: 7b59e7b2d0

Change-Id: I5acccdf24e02d3d06b0c76107af363076f8b57ff
2018-09-10 17:07:27 -07:00
Colin Cross 1e6d807d67 Fix manifest_fixer_test.py
am: 496d66d425

Change-Id: Ie43662c13a0c5847422f7188471bddf8e4d2260d
2018-09-10 17:07:22 -07:00
Colin Cross 091f645959 Merge "Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules""
am: cf7d5ab6d6

Change-Id: I27654214955fadaa4e454f5fe09158d76782da1c
2018-09-10 14:44:12 -07:00
Colin Cross 7b59e7b2d0 Make manifest_fixer.py keep targetSdkVersion high with min_sdk_version
targetSdkVersion should stay as "current" when min_sdk_version
is set but sdk_version is not.

Bug: 112438448
Test: atest CtsTelecomTestCases
Change-Id: I11dc27eccd31200d1ce27c7e332106bb825651b4
2018-09-10 14:41:56 -07:00
Colin Cross 496d66d425 Fix manifest_fixer_test.py
Fix tests after I8fcf0c5f452707565ba1808f6fe552ffed055c47.

Test: manifest_fixer_test.py
Change-Id: Ie55e28b537b960a5e0f4785eda2c0f619b89275c
2018-09-10 14:41:56 -07:00
Colin Cross cf7d5ab6d6 Merge "Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"" 2018-09-10 21:36:38 +00:00
Colin Cross cb9342eabd Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"
This reverts commit e2874cd99d.

Reason for revert: broke mac builds
Bug: 113936524

Change-Id: Id0311d6b202b18e80953da632133548d56ed851a
2018-09-10 21:35:34 +00:00
Dan Willemsen 1456958c83 Default BUILD_BROKEN_PHONY_TARGETS to false
All downstream users either mark BUILD_BROKEN_PHONY_TARGETS=true
explicitly, or don't have any warnings.

Test: build_test on downstream branches
Change-Id: I6e9d7ed42da941148827854851657895c2e98649
2018-09-10 13:06:43 -07:00
Colin Cross 3a088e42bf Export build/soong/scripts/strip.sh to Make
am: d2e92da626

Change-Id: I5486bd67466812073d122d7aa0a6dbf018fa87b5
2018-09-10 12:46:53 -07:00
Colin Cross 39e8b30068 Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
am: e2874cd99d

Change-Id: Idc3276796b5a8b71d3e70282c0538b7a7c81ac6b
2018-09-10 12:44:46 -07:00
Colin Cross d2e92da626 Export build/soong/scripts/strip.sh to Make
Bug: 113936524
Test: m checkbuild
Change-Id: I2d3d1e579b05117bf377852abedd5fc6d320401f
2018-09-10 11:05:01 -07:00
Colin Cross e2874cd99d Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.

Bug: 113936524
Test: m checkbuild
Change-Id: If9008c50920779048480f5eeeb0084f26006c998
2018-09-10 11:04:01 -07:00
Colin Cross eb548b9c47 Move kotlinc-build.xml out of classes directory
am: 0f40a7527a

Change-Id: I5090618d08d56bb8f09527f11ef48cd484cf0a56
2018-09-10 10:52:04 -07:00
Colin Cross 0f40a7527a Move kotlinc-build.xml out of classes directory
kotlinc-build.xml was ending up in the final jar because it was
being created in the directory where the classes were written.
Rename the variable containing the classes directory from outDir
to classesDir to discourage putting other files in there, and
move kotlinc-build.xml up a directory.

Bug: 114524493
Test: m checkbuild
Change-Id: Id2e2af0a6543499bd25b8fbd642bc59b14bd241f
2018-09-08 21:07:30 +00:00
Colin Cross a96414a7bc Merge "Fix inverted logic for objcopy vs. llvm-objcopy with --keep-symbols"
am: 0903f90e9a

Change-Id: I824ab42c1282494953b8e31768e50466042edf63
2018-09-07 20:57:33 -07:00
Treehugger Robot 0903f90e9a Merge "Fix inverted logic for objcopy vs. llvm-objcopy with --keep-symbols" 2018-09-08 03:49:13 +00:00
Colin Cross 0abcbe6a6d Fix inverted logic for objcopy vs. llvm-objcopy with --keep-symbols
Bug: 113936524
Test: m checkbuild
Change-Id: I958c4277342ed6885714a01bd9f35183ed73eda7
2018-09-07 17:36:40 -07:00
Mathieu Chartier 0c7bb7f31b Change LibartImgDeviceBaseAddress to 0x60000000
Lower it to have more space to allocate the region space after.

Test: make
Bug: 112670831
Change-Id: I336fe25466711d93481f30e69141449d3cfbf7e2
2018-09-07 14:06:39 -07:00
Evgenii Stepanov 44d6881b44 (soong) Add -fsanitize= argument to assembly flags.
am: dbf1d4f884

Change-Id: Ie3e48deef9b255b3b1e2ed12560e899c1b1baf0d
2018-09-07 10:41:30 -07:00
Evgenii Stepanov dbf1d4f884 (soong) Add -fsanitize= argument to assembly flags.
It allows use of sanitizer preprocessor macros (like __has_feature())
in assembly files.

Bug: 112438058
Test: SANITIZE_TARGET=hwaddress
Change-Id: Id3fed5492ab9473cbb13cd6c0485302412e8b1de
2018-09-07 10:23:07 -07:00
Dan Willemsen d877b27eea Merge "Remove GCC support from Make"
am: 2f7e3bb4d0

Change-Id: I32d17dca901bfc7b32f9305fee63f3ebbb58835a
2018-09-06 19:58:11 -07:00
Colin Cross f322c5f0ee Wrap panics that occur in AndroidMkDataProviders
am: 953d3a2b28

Change-Id: Ieecee223712e3968eb0ddad6c4d4cca5596da822
2018-09-06 19:56:25 -07:00
Treehugger Robot 2f7e3bb4d0 Merge "Remove GCC support from Make" 2018-09-07 02:42:27 +00:00
Colin Cross 953d3a2b28 Wrap panics that occur in AndroidMkDataProviders
Annotate panics that come from an AndroidMkDataProvider with the
module and variant that it was running on.

Test: m checkbuild
Change-Id: I4a2f32b1987dc028c446e9379a0738059e7679b1
2018-09-07 01:10:11 +00:00
Colin Cross aae66fa8d2 Merge changes Ifd529f88,I2fb4429a,I67ec2e94
am: 37710d3c71

Change-Id: I4e248297e225dc32c98aba008ee6ec74ff2f47a6
2018-09-06 16:31:11 -07:00
Colin Cross c4965aec96 Fix multilib first with multiple 64-bit architectures
am: 3dceee3241

Change-Id: Ib232357a336f45bef9beed2b609105ebf6402264
2018-09-06 16:27:52 -07:00
Treehugger Robot 37710d3c71 Merge changes Ifd529f88,I2fb4429a,I67ec2e94
* changes:
  Fix logic for adding gnu debuglink to match Make
  Add Soong support for stripping all symbols
  Add stripping and toc support to Soong cc_prebuilt modules
2018-09-06 23:05:09 +00:00
Simran Basi df98cd7aa4 Add OWNERS to finder's cache
Build target owners will create a zip of all OWNERS
files in source code based on the cached OWNERS.list

Bug: 114242886
Test: make dist -j owners

Change-Id: I97fa3737e1a2a240a08e072dfb2905c11f28705b
2018-09-06 15:55:52 -07:00
Dan Willemsen f640dbcd1f Remove GCC support from Make
We need to keep support in Soong until toolchain_library no longer uses
GCC.

Test: out/build-aosp_arm64.ninja is the same before/after
Test: build_test on downstream branches
Change-Id: Ib78bcd6d5544afc3a3164f65fa72a3f08b2acf29
2018-09-06 22:37:54 +00:00
Colin Cross 3dceee3241 Fix multilib first with multiple 64-bit architectures
Binaries that use multilib "first" expect zero or one architectures
because they will install to the same bin directory for any
architecture.  Replace preferTargets with firstTarget that always
returns zero or one Target.

Test: OUT_DIR=out_ndk build/soong/scripts/build-ndk-prebuilts.sh
Test: m checkbuild
Change-Id: I6dcfa9ecda30177e1a262153d93a5a205d5c7076
2018-09-06 10:24:05 -07:00
Colin Cross 6b0afa58fa Merge changes I3648c914,I47dec958,Ia20f8198
am: ca126c70d7

Change-Id: I1b2ce72203aeff7135a025baf68b946372ed5b66
2018-09-06 00:13:14 -07:00
Colin Cross ca126c70d7 Merge changes I3648c914,I47dec958,Ia20f8198
* changes:
  Allow strip.sh --keep-mini-debug-info to work on non-elf files
  Fix strip.sh --keep-mini-debug-info
  Remove relocation packer
2018-09-06 06:22:18 +00:00
Dan Willemsen 5e4a7d6c3d Refactor multiproduct_kati
am: bcc1dbf957

Change-Id: I0a6a1bf1d99c6d3ddcc7dba07d38bd231387f109
2018-09-05 18:32:10 -07:00
Dan Willemsen badb179730 Add an incremental mode to multiproduct_kati / build_test
am: 41538385e5

Change-Id: Icbc6d6410c388b26b461c05ecaacd72939d8c909
2018-09-05 18:32:02 -07:00
Colin Cross ed064c0b1f Fix logic for adding gnu debuglink to match Make
Only add gnu debuglink on userdebug builds to match Make, and don't
add it when using minidebuginfo, which doesn't support it.

Bug: 113936524
Test: m checkbuild
Change-Id: Ifd529f88d63afa5627172fb6ea612aea77159f40
2018-09-05 16:30:16 -07:00
Colin Cross 02b04bb299 Allow strip.sh --keep-mini-debug-info to work on non-elf files
strip.sh --keep-mini-debug-info matches the default for Make, and
is currently used on lots of files that are not elf files.  For
now, just make the behavior match Make and skip files when
strip --strip-all fails.

Bug: 113936524
Test: m checkbuild
Change-Id: I3648c914c0fd7cc9b68aa93fd3cb0b77504d42f6
2018-09-05 16:30:16 -07:00
Colin Cross 9a959cd519 Add Soong support for stripping all symbols
Bug: 113936524
Test: m checkbuild
Change-Id: I2fb4429aee689dc6a99dc973b37575a114e46be6
2018-09-05 16:30:16 -07:00
Colin Cross f843290eb8 Fix strip.sh --keep-mini-debug-info
strip.sh --keep-mini-debug-info had extra $$ escaping from when it
was copied from make.

Bug: 113936524
Test: m checkbuild
Change-Id: I47dec958152584ca94c6149b11a06e64be2f22f9
2018-09-05 16:30:16 -07:00
Colin Cross 88f6fefeb4 Add stripping and toc support to Soong cc_prebuilt modules
Bug: 113936524
Test: m checkbuild
Change-Id: I67ec2e94d349924c3e209939030b204fdaff9c47
2018-09-05 16:30:16 -07:00
Colin Cross 22f3795dca Remove relocation packer
The relocation packer prebuilt is gone, remove the references to it.

Bug: 110715614
Test: m checkbuild
Change-Id: Ia20f8198e4fc206f4995dd5168c811dac7c9df89
2018-09-05 16:30:11 -07:00
Dan Willemsen bcc1dbf957 Refactor multiproduct_kati
Move the actual per-product builds out of the main function, combining
the product configuration and build sections. This makes it a lot more
readable.

This ends up saving a lot of FDs -- a -only-config build on aosp with 77
products used to require ~500 FDs, it succeeds with a limit of 150 FDs
now. I'm leaving the code to bump our FD limit though, since 2x the
number of internal products is too close to the 1024 limit for comfort.

Bug: 70370883
Test: prlimit -n150:150 build/soong/build_test.bash -only-config
Change-Id: Ia559beadc19deb8a5b9d50af6e0276e846fd8608
2018-09-05 13:57:10 -07:00
Dan Willemsen 41538385e5 Add an incremental mode to multiproduct_kati / build_test
This uses a very large amount of intermediates, but can speed up
subsequent multiproduct_kati runs by not re-reading all the makefiles
unless necessary.

Since we'll no longer have the full build output on every run,
explicitly save away a std_full.log of the log from the last time we ran
Kati.

Test: build/soong/build_test.bash -products aosp_arm -incremental
Change-Id: Iaae580c0e49a2024528617d39b2b477e29d99250
2018-09-05 13:53:59 -07:00
Mathew Inwood 284c191ffd Merge "Adapt special case framework support."
am: 32a96ad6f5

Change-Id: I4be1b9f10720a195ae68f85601509f23909f5f07
2018-09-05 09:29:33 -07:00
Mathew Inwood 32a96ad6f5 Merge "Adapt special case framework support." 2018-09-05 16:13:32 +00:00
Dan Willemsen 61b4908ab4 Merge "Pass --writable to kati"
am: 12553598bd

Change-Id: I2cc3925706794316519a0acf1fb9b39508727282
2018-09-04 19:27:14 -07:00