Commit graph

9779 commits

Author SHA1 Message Date
Alex Light
4087dd660f Merge "Update compdb to put full path to compiler" 2019-01-29 20:52:27 +00:00
Alexander Smundak
faaece8cb0 Merge "Convert BUILD_PREBUILT with LOCAL_MODULE_CLASS=ETC to prebuilt_etc" 2019-01-29 20:42:42 +00:00
Treehugger Robot
910cdf95cd Merge "system-clang-format: DontAlign" 2019-01-29 18:00:37 +00:00
Alex Light
5956b2b3cb Merge "Add support for symlink_preferred_arch in apex" 2019-01-29 17:41:25 +00:00
Alex Light
e812818656 Update compdb to put full path to compiler
Some language servers (vscode) seem to have started to rely on the
compiler being an absolute path recently. This updates the compdb
generator to match this expectation.

Bug: https://github.com/Microsoft/vscode-cpptools/issues/3112
Test: m nothing && m SOONG_GEN_COMPDB=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
Test: Open vscode
Change-Id: Id146d69c2b808b23896132bbd4bc38ed5c7fd9c7
2019-01-29 17:27:37 +00:00
Treehugger Robot
6703e6f390 Merge "Remove libnativehelper from global includes" 2019-01-29 14:30:16 +00:00
Logan Chien
02880e4196 Add missing dependencies for python_test
This commit adds missing shared lib dependencies for `python_test`
modules with embedded launcher.

Bug: 119086738
Test: CHECK_ELF_FIELS=true make check-elf-files
Change-Id: I26f8e1eb9086930093f60c7daa54469850fab32d
2019-01-29 22:26:57 +08:00
Dan Willemsen
ef661b7f18 Fix runtime panics being suppressed
fatalLog was matching runtime errors, and essentially hiding them.

Test: m blueprint_tools
Change-Id: Ib48e7e142fc096998bc14b21fb717392adcff0ec
2019-01-28 20:00:01 -08:00
Alex Light
3d67359f2f Add support for symlink_preferred_arch in apex
Some modules rely on symlink_preferred_arch to have expected files
present. This change makes apexs include these symlinks.

Test: m com.android.runtime.debug
      pushd $(mktemp -d)
      mkdir mnt
      unzip $OUT/apex/system/com.android.runtime.debug.apex
      sudo mount -o loop,ro apex_payload.img mnt
      Ensure that mnt/bin/dalvikvm and mnt/bin/dex2oatd both exist and
      are symlinks to mnt/bin/dalvikvm64 and mnt/bin/dex2oatd32
      respectively.

Bug: 119942078
Bug: 122373634
Bug: 123079311
Change-Id: I47868fbedc5bdd3141a836c488f79e91e0a6ddfe
2019-01-29 03:21:47 +00:00
Treehugger Robot
62f6fcbbb9 Merge "Create sanitizer variants of APEX only when SANITIZE_TARGET is set" 2019-01-29 02:46:31 +00:00
Steven Moreland
a4319f7800 system-clang-format: DontAlign
AlignAfterOpenBracket: DontAlign

The main consideration is this:

if (foo && ....
    foo) {
    // code

->

if (foo && ....
        foo) {
    // code

Change-Id: Ife0073c8544b9554df2eb54e10dc2e7611631299
Fixes: 122835115
Test: manual
2019-01-28 18:21:15 -08:00
Treehugger Robot
b55752827a Merge "stubs lib can export headers lib" 2019-01-29 01:52:30 +00:00
Logan Chien
a9403f279c Merge "Fix a typo related to abidiffs" 2019-01-29 00:52:31 +00:00
Jiyong Park
7e636d0b98 stubs lib can export headers lib
Add a dependency from a stubs lib to headers libs so that the headers
can be re-exported.

Bug: 122717287
Test: m; a test added to apex_test.go
Change-Id: I8d48c072815c6b02d343ef09cb44dfc6d1af8e64
2019-01-29 07:38:42 +09:00
Treehugger Robot
0425aa13ec Merge "Add __ANDROID_APEX__" 2019-01-28 22:25:13 +00:00
Jiyong Park
388ef3f5aa Create sanitizer variants of APEX only when SANITIZE_TARGET is set
This fixes a problem that APEX is unconditionally mutated for all
sanitizer types. This can make an APEX to include sanitized version
of a lib even when SANITIZE_TARGET is not set. It can happen when lib X
is directly depended on by an APEX (e.g. via native_shared_libs) and X
has a sanitized variant due to the dependency from another library Y
which is force sanitized (via 'sanitize' property). In that case,
regardless of lib Y is in the APEX or not, the APEX chooses the
sanitized variant of lib X since the dependency from APEX to the lib is
created with AddFarVariationDependency.

Fixing this problem by mutating the APEX for a sanitizer type only when
the device is requested to be sanitized.

Bug: 122717287
Test: add libnetd_client to com.android.runtime APEX.
Inspect build.ninja to verify that libnetd_client.so in the runtime APEX
is not a sanitized one.

Change-Id: I918bc8407137d74c5456142b3a29de13df68c0b3
2019-01-29 07:10:31 +09:00
Treehugger Robot
d4fa0f3dca Merge "Move system-clang-format to a central location." 2019-01-28 20:16:54 +00:00
Dan Willemsen
96ce8e71a3 Stop exporting the windows toolchain to Make
Make no longer supports building for Windows, they must be in Android.bp
files now.

Bug: 122618577
Test: compare build-aosp_arm.ninja before/after
Change-Id: Ie70d8519850da5b1bdddf73788f984eb3f4f0900
2019-01-28 10:59:16 -08:00
Dan Willemsen
b05526711e Add sh_binary[_host] for shell script that should be installed as executable
We've been putting these in cc_prebuilt_binary, but that's not really
correct. It also tries adding '.exe' to the end of windows executables,
which isn't desirable for bat files.

Test: Use sh_binary_host
Change-Id: Idd5418dceb81ac55b766c987fbb69a810aeb8a3b
2019-01-28 10:59:10 -08:00
Jiyong Park
58e364a373 Add __ANDROID_APEX__
A module can be built multiple times when it is referenced from one
or more APEXes. Sometimes, it is required for the module to behave
differently depending on the context; e.g., do A when built form
APEX M, do B when built for APEX N, and do C when built for platform.

The idea is to have a macro __ANDROID_APEX__ which is set to the
name of the apex that the module is built for. It is undefined when
the module is built for platform.

Bug: 122714993
Test: m (apex_test amended)
Change-Id: I11a89c6a0e799f4810194de7ef9ee472a71ca498
2019-01-28 20:02:27 +09:00
Logan Chien
8f74fe6e14 Fix a typo related to abidiffs
This commit fixes a typo related to abidiffs.  The generated abidiffs
should be copied to `$$DIST_DIR/abidiffs` instead of
`$$DIST_DIR/abidiff`.

(See also. https://android-review.googlesource.com/796458/)

Bug: 123491909
Test: lunch aosp_x86-userdebug && make dist
Change-Id: I89c13580344a27cac5ea0d00497f5bba3227cf61
2019-01-28 14:30:04 +08:00
Orion Hodson
1e7c3d63a9 Remove libnativehelper from global includes
Bug: 119840313
Test: m checkbuild
Change-Id: Id80e26a396c2e289dcd2596a5b799e251d9ccf1b
2019-01-27 11:11:01 +00:00
Treehugger Robot
ee04139154 Merge "Add --top_level_phony to catch more real-to-phony problems" 2019-01-26 05:08:15 +00:00
Colin Cross
15daf44967 Merge "Fix aar rules" 2019-01-26 04:55:03 +00:00
Treehugger Robot
587414a028 Merge "Switch cp(1) to toybox." 2019-01-25 22:48:27 +00:00
Treehugger Robot
1d08e2f66e Merge "Only copy native binaries on native-bridge configs" 2019-01-25 22:35:58 +00:00
Elliott Hughes
48d716c367 Switch cp(1) to toybox.
Test: treehugger
Change-Id: I908e1d6aa2aa7016432ac7ff4abc56e8163bad8a
2019-01-25 22:29:58 +00:00
Jaewoong Jung
10357c3b22 Merge "Add a prod var to override package names." 2019-01-25 22:07:48 +00:00
Colin Cross
f57c57825e Fix aar rules
aar files should build to the module out directory, not the root of
the out directory.  Also give the rules a description so they get a
better status line.

Test: m out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/SystemUI-core.aar
Change-Id: Ie8de0421427985c466d909f83c8e0146f7e0bea8
2019-01-25 13:29:12 -08:00
Colin Cross
eefe9a35b2 Add export_*_lib_headers to static and shared properties
Allow specifying export_static_lib_headers and export_shared_lib_headers
in the static or shared properties of cc_library modules.

Use a named struct for the properties to avoid having to create
a runtime struct type since none of the properties are filtered.
This avoids running into the name length limit in runtime.StructOf.

Fixes: 122882789
Test: m checkbuild
Change-Id: Ib0e9933e93981ba44668a19ed748bd12a4dd4257
2019-01-25 21:27:02 +00:00
Colin Cross
cb9880786d Optimize filterArchStruct when nothing is filtered
Runtime-created struct types have limit on the name of the type,
which is the full text of the fields in the struct.  Avoid creating
runtime struct types when filtering produces an identical struct.
Also add tests and godoc for filterArchStruct.

Test: arch_test.go
Change-Id: If7eb27ea9e72073d5252e93f2110b08889ed76b1
2019-01-25 21:26:53 +00:00
Jaewoong Jung
9d22a914bf Add a prod var to override package names.
Currently only java/app.go is affected by package name overrides. When
the var is used, the corresponding module's install APK name is changed
to the overriding name.

Bug: 122957760
Test: app_test.go + TreeHugger
Change-Id: Ie522da3d7280970d740d779cf2694560feae6180
2019-01-25 19:11:57 +00:00
Treehugger Robot
ea5c1f453c Merge "Switch hostname(1) to toybox." 2019-01-25 17:44:12 +00:00
Adrian Roos
e3fe481c5a Add last released API check to checkapi for public Android API
Test: make droid
Bug: 123222452
Change-Id: I2b0b6c9196bfb963bd6085554ff6fdcc9cb53942
2019-01-25 17:18:18 +00:00
Nicolas Geoffray
d15d614214 Merge "Make boot classpath jars in apexes uncompressed." 2019-01-25 12:10:33 +00:00
Anton Hansson
7171ffa97f Merge "Parameterize RRO test" 2019-01-25 10:14:05 +00:00
Nicolas Geoffray
5921f75b7c Make boot classpath jars in apexes uncompressed.
Save some space on /system by avoiding a copy in the .vdex files.

Test: m && /system/framework/boot-*.vdex files doesn't contain dex code.
Change-Id: I10cdcfe46a36a49a75f7640e20d065912812ab9f
2019-01-25 09:04:15 +00:00
Jiyong Park
64a44f231d Make sure that ASAN runtime lib is the first DT_NEEDED one
Introduce a new tag earlySharedDepTag which is added in front of the
ordinary sharedDep dependencies. Dependency to the ASAN runtime lib is
added with the new tag.

Bug: 120894259
Bug: 121038155
Test: m; SANITIZE_TARGET=address m
Use readelf -d to see if the runtime lib is in the first DT_NEEDED one.

Change-Id: I90de6ab95df734a99995532d826564b13fe05316
2019-01-25 14:05:51 +09:00
Treehugger Robot
de54534d2a Merge "Revert "Revert "Fix: sanitizerRuntimeMutator is not run for host""" 2019-01-25 04:54:40 +00:00
Treehugger Robot
8ed613d456 Merge changes If712ce7d,I23c62b75
* changes:
  Clean up srcjar directories after each rule
  Fix conflicting srcjar dir for current and last apicheck
2019-01-25 04:29:02 +00:00
Dan Willemsen
e4f12785db Merge "Remove armv7-a without neon support" 2019-01-25 03:52:17 +00:00
Sasha Smundak
7054764304 Convert BUILD_PREBUILT with LOCAL_MODULE_CLASS=ETC to prebuilt_etc
The conversion is a two-step process: first, when processing
BUILT_PREBUILT, convert LOCAL_SOURCE_PATH to a variable reference+fixed
subpath path in the blueprint AST. Then, set various boolean flags
depending on variable being referenced. androidmk_test.go has a test for
each handled case.

Change-Id: Iabd18d5f8645ca7077536863cd6640df5b24d24a
Fixes: 122906526
Test: treehugger
2019-01-24 18:46:31 -08:00
Colin Cross
44c29a8fe1 Clean up srcjar directories after each rule
The srcjar directories just confuse people looking for generated
files, clean them up after each rule.

Test: m checkbuild
Change-Id: If712ce7d4922619fd8420ae8f89830fe7824114d
2019-01-25 00:53:05 +00:00
Colin Cross
39c1679e69 Fix conflicting srcjar dir for current and last apicheck
Each rule needs its own srcJarDir.

Bug: 123222452
Test: m checkbuild
Change-Id: I23c62b75c7532eca9320b12235a102141d6eeefa
2019-01-25 00:52:50 +00:00
Treehugger Robot
2f4789d612 Merge "Avoid filepath.Abs" 2019-01-25 00:35:24 +00:00
Pirama Arumuga Nainar
6aa210243c Revert "Revert "Fix: sanitizerRuntimeMutator is not run for host""
Bug: http://b/123254047

This reverts commit 84757ea7ea.

Reason for revert: veridex asan failure is fixed.

Change-Id: Id03180b8d3d1dc1386fd7e4f800d64dc8578139c
2019-01-25 00:21:02 +00:00
Tor Norbye
60eed0ee25 Merge "122452571: Fix path to android.jar in prebuilts" 2019-01-25 00:00:53 +00:00
Dan Willemsen
cc62890866 Add --top_level_phony to catch more real-to-phony problems
As more phony rules move either to the packaging kati run, or soong, the
existing real-to-phony check failed to notice that they were phony
rules.

So I added --top_level_phony to Make that assumes that all leaf nodes
(source files, or nodes generated by another ninja file generator) that
do not have a '/' in them are phony targets.

The existing phony-looks-real check in Kati should prevent these from
being real generated files, and our source tree shouldn't have any
source files used at the root level.

Test: build_test on downstream branches
Change-Id: I77cff84b536c6cd6402307a9aa5a9c273e72c71f
2019-01-24 15:53:06 -08:00
Dan Willemsen
f4e0601c7e Remove armv7-a without neon support
Test: treehugger
Change-Id: I8565d84224daedb6a6dde6dfb9c0fe5f5fabb0f6
2019-01-24 15:51:26 -08:00
Colin Cross
7788c1283f Remove annotation_processors property
Now that there are no uses left of annotation_processors remove
the property.

If there are no annotation processor classes for javac for a module,
due to an empty "plugins" property or using kapt for annotation
processors, pass -proc:none to javac to ensure it does not try
to run any annotation processors found in the classpath.

Bug: 77284273
Test: plugin_test.go, kotlin_test.go
Change-Id: I3823d9fec8d3d07d2e49b1d97839f7fcbdd35647
2019-01-24 23:48:04 +00:00