Commit graph

8331 commits

Author SHA1 Message Date
David Brazdil
9b106574fa Merge "Support setting android:usesNonSdkApi in manifest_fixer.py" 2018-08-31 09:59:39 +00:00
Dan Willemsen
090ec58af5 Add tee to the allowed PATH tools list
tee is used by art/build/Android.gtest.mk during testing

Change-Id: I45993366622694edef5494d9e74b8465a15a8795
2018-08-31 08:13:13 +00:00
Logan Chien
f4b79c684a Check ABI stability of all NDK libs
This commit extends ABI stability checks to all NDK shared libs
(including the framework-related ones such as libandroid.so).

Bug: 112404572
Bug: 79576032
Test: make findlsdumps  # (and check the output)
Change-Id: I0147c60ce0c90d187f85b996911d98326a0c37ae
2018-08-31 02:55:28 +00:00
Dan Willemsen
2d31ace93e Add od to allowed PATH tools
od is used by ninja's inline.sh tool to encode a python script in a C
header.

Test: forrest run of build-tools branch
Change-Id: I87001a02b168ebe183b8b7dc495c67bb43f1b86d
2018-08-30 16:53:02 -07:00
Dan Willemsen
d038cfcbea Merge "Start enforcing the $PATH restrictions" 2018-08-30 23:31:25 +00:00
Treehugger Robot
418d261481 Merge "Skip DepsMutator on disabled modules" 2018-08-30 22:56:32 +00:00
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
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
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
Steven Moreland
fa287846ea Add libbinder_ndk to the NDK.
Bug: 111445392
Test: atest android.binder.cts.NdkBinderTest
Change-Id: If7e25f6e856524c531c41dacf3e7f798f42cc7a5
2018-08-29 21:45:51 -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
Treehugger Robot
33d92aa2b0 Merge "Add unix2dos as an allowed PATH tool" 2018-08-29 21:57:18 +00: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
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
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
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
Treehugger Robot
6dcc81c3c6 Merge "Support Mac 10.14 SDK" 2018-08-29 01:53:42 +00: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
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
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
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
Treehugger Robot
42ff416da3 Merge "Add fuser to allowed PATH tools" 2018-08-28 01:31:33 +00:00
Jiyong Park
5baac54d58 link type of recovery variant of a vendor module should not be native:vendor
This CL fixes a bug that when a module is configured as 'vendor: true' &&
'recovery_available: true', the link type of the recovery variant of the
module is incorrectly set to 'native:vendor'. This was because,
androidmk.go emits 'LOCAL_PROPRIETARY_MODULE := true' whenever
Proprietary property is set to true, regardless of whether it is a
recovery variant or not. This in turn makes LOCAL_USE_VNDK := true for
the module which in turn causes the link type to be 'native:vendor'.

Fixing the bug by resetting the properties like Proprietary, Vendor,
Soc_specific, etc. for the recovery variants.

Bug: 113277544
Test: m -j (test added)
Change-Id: I5d6ae76e46ef8fcd9204d386d0809862a7b0ff7e
2018-08-28 10:03:17 +09:00
Treehugger Robot
15d7f26c4e Merge "Support turning phony warnings into errors" 2018-08-28 00:32:00 +00:00
Dan Willemsen
b4d0144a6f Add fuser to allowed PATH tools
fuser is used by goma

Test: none
Change-Id: I9acf4dd062c3b767a1688e4f236a96d5f2b8a7f6
2018-08-27 16:45:23 -07:00
Chih-Hung Hsieh
b699c43f89 Define PATH_TO_CLANG_TIDY_SHELL for build/make rules.
* PATH_TO_CLANG_TIDY_SHELL is ${config.ClangTidyShellPath},
  wich is "build/soong/scripts/clang-tidy.sh"

Bug: 110538415
Test: build with WITH_TIDY=1
Change-Id: I27d7be095c998583fa9ad4d705aa1332bd018140
2018-08-27 16:19:59 -07:00
Dan Willemsen
d8aa39d1c3 Support turning phony warnings into errors
These still default to warnings, but if a board decides to set
BOARD_BROKEN_PHONY_TARGETS := false, they'll turn into errors. More
likely I'll just be marking the broken targets as broken, then switching
the logic here to be like the dup rules warnings/errors.

Test: On a build with warnings, try <missing>, "false", and "true"
Change-Id: I041e1ff4618c4114ec43015b6c0ae1b49b36b6f8
2018-08-27 15:01:03 -07:00
Treehugger Robot
4bd15d36e7 Merge "Put kotlin classes in header jar" 2018-08-27 21:16:21 +00:00
Colin Cross
55f63eadbd Put kotlin classes in header jar
If a module has kotlin sources the compiled kotlin clsases must be put
in the header jar for anything that depends on the module to use.

Bug: 113153312
Test: m checkbuild
Change-Id: Ibc44e9a97655937315b03b05e51e09c2954d7008
2018-08-27 13:19:49 -07:00
Søren Gjesse
0d91f1727e Merge "Ensure that the R8 minification map (ProGuard dictionary) file exists" 2018-08-27 16:06:07 +00:00
Søren Gjesse
0e84935ac4 Ensure that the R8 minification map (ProGuard dictionary) file exists
R8 no longer outputs an empty map file when minification
(obfuscation) is turned off.

Test: m -j PRODUCT-aosp_x86-eng
Change-Id: I317e703597368dc8c16751bcc8d0e43f985614fa
2018-08-27 12:56:16 +02:00
Treehugger Robot
09664bd9a5 Merge "NDK sysroot: include each license file only once" 2018-08-24 22:40:32 +00:00
Nan Zhang
21aac6b64b Merge "Revert "Revert "Make Metalava checkapi a seperate run.""" 2018-08-24 21:33:15 +00:00