Commit Graph

8395 Commits

Author SHA1 Message Date
Yi Kong 0098166cb4 Prebuilts shouldn't inherit linker interface
Prebuilts doesn't go through linking stage, thus it should not inherit
any dependencies or flags from linker.go.

Test: m checkbuild
Bug: 29275768
Change-Id: I1f1dc5d65c2fc2dd905e8df44e08d5c83b224d0c
2018-08-30 14:33:06 -07:00
Colin Cross 6db4a6a7d9 Skip DepsMutator on disabled modules
Dependencies of disabled modules may not have the right variations
for calling AddVariationDependencies, skip DepsMutator completely
on disabled modules.

Bug: 112707915
Test: m checkbuild
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: I702e591437e5e6eb9f91f3b7eb32bacc4bd5d249
2018-08-30 19:54:37 +00:00
Pirama Arumuga Nainar 191f646295 Use Windows security mitigation features: ASLR, DEP
Bug: https://issuetracker.google.com/36952278
Bug: http://b/113171785

From
https://android-review.googlesource.com/c/platform/system/core/+/737292:

The --dynamicbase linker flag enables use of Address Space Layout
Randomization (ASLR) on Windows Vista and newer. It causes the code
segment / module to be loaded at unpredictable addresses to make
exploits harder to construct.

The --nxcompat linker flag enables use of Data Execution Protection
(DEP) on Windows XP SP2 and newer. It causes the process to be killed if
the process tries to execute code on memory pages not marked executable.
This makes exploits harder to construct because the stack is then not
executable, other data pages aren't, etc.

These bits are already set on AdbWinApi.dll and AdbWinUsbApi.dll.

--high-entropy-va provides improved ASLR.

Credit: Spencer Low for doing the initial work at
https://android-review.googlesource.com/c/platform/system/core/+/737292.

Test: Verify that DLLCharacteristics reported by 'objdump -x' is:
      0x140 for 32-bit and 0x160 for 64-bit.  Also verified trivial use
      cases under Wine.

Change-Id: I1b898cd36c7c627916dae9ce7dfd1c27de1e3c59
2018-08-30 12:54:33 -07:00
Colin Cross 8155b5e83f Enforce dependencies have right architecture
am: 42d48b7b8b

Change-Id: Ia68fc583549e503da719a40c83a37002fe33bca5
2018-08-30 11:25:59 -07:00
Colin Cross 632987ac21 pom2bp: clean up templates
Move some of the more complicated conditional logic out to helper
functions.  Use the {{- }} syntax to strip previous whitespace to
allow spacing out the remaning conditionals in the templates.

Test: (cd prebuilts/sdk/current/androidx && pom2bp -regen Android.bp)
Change-Id: I766bd0e1837aa04375f322fbe796d923cd99ecde
2018-08-30 11:18:50 -07:00
Colin Cross 42d48b7b8b Enforce dependencies have right architecture
ctx.AddDependency will succeed if the named dependency only has a
single variant, even if that variant is the wrong architecture.
Use ctx.AddVariationDependency(nil, ...) instead, which requires
that all variations of the calling module match the dependency.

Bug: 112707915
Test: no change to out/soong/build.ninja
Test: using a device dependency in a host java module is an error
Change-Id: I70b661a57d4412eb63b8c9841febfb756e9e025d
2018-08-30 16:31:02 +00:00
Nan Zhang 2c44285377 Merge "Add jetifier support in Soong."
am: b69575b1f6

Change-Id: I9f7c95114c8aeece111de86790035b1d7165454f
2018-08-30 08:41:00 -07:00
Nan Zhang b69575b1f6 Merge "Add jetifier support in Soong." 2018-08-30 15:28:46 +00:00
Dan Willemsen 8125d2a2a2 Start enforcing the $PATH restrictions
Anything that isn't explicitly marked as Allowed in this list will now
return an error (and log a message) when it is executed.

Test: search all logs from the build server over the last day
Change-Id: I3ceacd9a140097809dde81a8d8979dd2c45f234c
2018-08-30 06:20:26 +00:00
Colin Cross 75ade5c3c8 pom2bp: use java_import_host for host modules
am: 8a9900a75f

Change-Id: Icfd86bb9a2a1cee2340322c27d0ef5789e3f4912
2018-08-29 18:21:34 -07:00
Colin Cross f2bd7c359f gofmt -w .
am: 86bc9d4622

Change-Id: I20f8a945a503e730574f827f7624ce238db0ebcf
2018-08-29 18:21:27 -07:00
Colin Cross 8a9900a75f pom2bp: use java_import_host for host modules
java_library_host modules shouldn't depend on java_import modules.

Bug: 112707915
Test: (cd prebuilts/sdk/current/androidx && pom2bp -regen Android.bp)
Change-Id: Ia5ac353a696c9f51f1b50b334a327937ddcb47e7
2018-08-29 15:37:19 -07:00
Colin Cross 86bc9d4622 gofmt -w .
Test: m checkbuild
Change-Id: Ia4aec5ddadf1f1b00f7c567522ca89fd839504f0
2018-08-29 15:37:15 -07:00
Dan Willemsen 24f506b46b Merge "Add unix2dos as an allowed PATH tool"
am: 33d92aa2b0

Change-Id: I906a276db481d0aceabee1ef83e87425421253b5
2018-08-29 15:28:50 -07:00
Treehugger Robot 33d92aa2b0 Merge "Add unix2dos as an allowed PATH tool" 2018-08-29 21:57:18 +00:00
Jason Monk 4f693e9335 Merge "Fix manifest merging flags"
am: 97d5ed70a0

Change-Id: I97630ba65303f1e71d126fc2042cf951fd1c3b92
2018-08-29 14:14:06 -07:00
Treehugger Robot 97d5ed70a0 Merge "Fix manifest merging flags" 2018-08-29 21:04:35 +00:00
Nan Zhang 4c819fb590 Add jetifier support in Soong.
This is a blocker for droiddoc targets migration under vendor/.

Test: N/A
Bug: b/72552006
Change-Id: If85a0917c1ac0d88b9d5b488216a638b4dabd39f
2018-08-29 11:37:32 -07:00
Colin Cross 260ff61997 Merge "Revert "Add support for renamed kotlin stdlib.""
am: fc15390b9c

Change-Id: Ia7aff0bc49b73df6a76e35ba93cd59c1bff83cde
2018-08-29 10:45:24 -07:00
Treehugger Robot fc15390b9c Merge "Revert "Add support for renamed kotlin stdlib."" 2018-08-29 17:36:28 +00:00
Dan Willemsen 6fa18f4e10 Add unix2dos as an allowed PATH tool
unix2dos is used instead of todos by some build servers in
development/build/tools/patch_windows_sdk.sh

Test: none
Change-Id: I04cb2258f71bebfc8792b7aa95643a45ffe3ec5c
2018-08-29 10:26:47 -07:00
Tom Cherry 6245e3b429 Merge "Add $PRODUCT_OUT/ramdisk to installclean"
am: 27a509b017

Change-Id: I1991fdb80a52c3b39305e41b74e1135eeed81dba
2018-08-29 10:13:37 -07:00
Tom Cherry 27a509b017 Merge "Add $PRODUCT_OUT/ramdisk to installclean" 2018-08-29 17:05:40 +00:00
Colin Cross 9b38aef182 Revert "Add support for renamed kotlin stdlib."
This reverts commit 66c0c4067f.

Bug: 112674805
Test: m checkbuild
Change-Id: I687888136b570f080b57af352af0130355acd216
2018-08-29 05:41:25 +00:00
Dan Willemsen d83ba979f4 Clean up darwin cc toolchain
am: e97e68a05a

Change-Id: I3adf41a6b8eab2bee60c518fb9465ad70de9d9e5
2018-08-28 21:24:07 -07:00
Dan Willemsen e97e68a05a Clean up darwin cc toolchain
Remove the ability for Soong to build 32-bit darwin code. We've already
disabled this in Make, this is just removing the unused bits in Soong
and simplifing the toolchain config.

Test: m host
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I968c5d98bdf162297d639f7988918dadb7ba6e07
2018-08-28 20:08:50 -07:00
Dan Willemsen 58f6fed8e2 Merge "Support Mac 10.14 SDK"
am: 6dcc81c3c6

Change-Id: I0231c56f893d13be29a571669df7604f91a5873f
2018-08-28 19:04:43 -07:00
Treehugger Robot 6dcc81c3c6 Merge "Support Mac 10.14 SDK" 2018-08-29 01:53:42 +00:00
Evgenii Stepanov 9db38882cf Merge "Pass hwasan extra cflags to make."
am: 9f7cb4e22c

Change-Id: Id3b97cefdaa2212c58565e66dab64b9e8e5a052c
2018-08-28 17:18:10 -07:00
Dan Willemsen 43464689be Merge "Add todos to the allowed PATH list"
am: de6eac1d8b

Change-Id: I5cc1a009a1a59941685b971fab37ff83791e60b5
2018-08-28 17:17:13 -07:00
Nan Zhang 57715aa032 [java9] Add "--dex-api" option to Metalava.
am: aa43b94107

Change-Id: I456f4809edd6d79a87e080f4ed30599fc0f8bb09
2018-08-28 17:05:08 -07:00
Treehugger Robot 9f7cb4e22c Merge "Pass hwasan extra cflags to make." 2018-08-29 00:00:27 +00:00
Treehugger Robot de6eac1d8b Merge "Add todos to the allowed PATH list" 2018-08-28 23:56:13 +00:00
Dan Willemsen 5a050c0183 Support Mac 10.14 SDK
Now that we don't compile 32-bit binaries, this seems to work, at least
in Xcode 10 beta 6.

Test: m checkbuild host
Change-Id: I61a98a3c31b331d6d01cd633f8d949fad86047cb
2018-08-28 16:48:45 -07:00
Nan Zhang aa43b94107 [java9] Add "--dex-api" option to Metalava.
This allow Metalava to generate public-dex file when user specify
dex_api_filename.

This blocks how we try java9 for droiddoc since "hiddenapi-lists-docs"
targets depends on libcore sources.

Test: m -j hiddenapi-lists-docs
Bug: b/78245848

Change-Id: Ic847c1123b14afb599dbf2a588885fd36e56b2cc
Merged-In: Ic847c1123b14afb599dbf2a588885fd36e56b2cc
2018-08-28 15:52:49 -07:00
Jason Monk 6f937a99e3 Fix manifest merging flags
library manifests were just being dropped on the ground.

Bug: 112467584
Test: build
Change-Id: I61c2efca37aa3fdb9c944260f4a276d1d3c26f6c
Merged-In: I61c2efca37aa3fdb9c944260f4a276d1d3c26f6c
(cherry picked from commit b7c147efec)
2018-08-28 14:10:03 -07:00
Evgenii Stepanov a6302337c8 Pass hwasan extra cflags to make.
Bug: 112438058
Test: SANITIZE_TARGET=hwaddress
Change-Id: If57e5f4cf78037992936ce94a98f017676b7e74b
2018-08-28 13:51:05 -07:00
Chih-hung Hsieh 4cef9cbbad Merge "Define PATH_TO_CLANG_TIDY_SHELL for build/make rules."
am: 4b42edbca0

Change-Id: Ie19f560057ef5d3e2ef0671e8af42dd3d1261626
2018-08-28 12:21:36 -07:00
Neil Fuller 0b4800bb38 Merge "Track changes to add core-simple to the boot cp"
am: 573864c015

Change-Id: I538c1410de40a31441fcc653a0fe20933c16dcf6
2018-08-28 11:25:31 -07:00
Chih-hung Hsieh 4b42edbca0 Merge "Define PATH_TO_CLANG_TIDY_SHELL for build/make rules." 2018-08-28 18:18:32 +00:00
Neil Fuller 573864c015 Merge "Track changes to add core-simple to the boot cp" 2018-08-28 17:36:54 +00:00
Jiyong Park 58918f3e69 Merge "link type of recovery variant of a vendor module should not be native:vendor"
am: c842742f5d

Change-Id: I934a5dcb8dfb84d3e1e044ada1d2c2dd25c3fbff
2018-08-28 07:27:46 -07:00
Treehugger Robot c842742f5d Merge "link type of recovery variant of a vendor module should not be native:vendor" 2018-08-28 14:20:14 +00:00
Neil Fuller 6095259f5b Track changes to add core-simple to the boot cp
See the change in build/make for details.

Bug: 113148576
Test: make checkbuild / Treehugger
Change-Id: I6f7901642c6b907b1e8e9dd31ced3bf1ea6dfd4d
2018-08-28 13:16:19 +01:00
David Brazdil d5b74996be Support setting android:usesNonSdkApi in manifest_fixer.py
Add new command line flag to manifest_fixer.py which will add
'android:usesNonSdkApi="true"' attribute to the <application> tag.

Bug: 113315999
Test: build/soong/scripts/manifest_fixer.py
Change-Id: If030c90a4ced3f5c5176727c579a87d0ecab6cf8
2018-08-28 12:41:01 +01:00
Anton Hansson 6f8fe47eb3 Merge "Pass extra args from multiproduct_kati to config."
am: 179d89bc5b

Change-Id: Ieb04ce62604c2aeea8b098f3d4acfa8038d79b72
2018-08-28 00:41:15 -07:00
Anton Hansson 179d89bc5b Merge "Pass extra args from multiproduct_kati to config." 2018-08-28 07:27:59 +00:00
Dan Willemsen 7a08bc5467 Add todos to the allowed PATH list
todos is used by development/build/tools/patch_windows_sdk.sh

Test: m win_sdk; check out/soong.log
Change-Id: I5e1a290838cc34261d7f5fc321afe79a8b1a6fbb
2018-08-28 00:18:02 -07:00
Dan Willemsen 6f59a9e561 Merge "Add fuser to allowed PATH tools"
am: 42ff416da3

Change-Id: I1414bf8c23f0fa54aee50f49af9ac51fd9ebc820
2018-08-27 18:38:05 -07:00
Treehugger Robot 42ff416da3 Merge "Add fuser to allowed PATH tools" 2018-08-28 01:31:33 +00:00