We keep having makefiles reading $DISPLAY, and GREP_OPTIONS with
--color=always has caused problems with shell commands in the past.
Bug: 37333696
Test: GREP_OPTIONS="--color=always" m -j
Test: DISPLAY=test m -j (modify an Android.mk to check DISPLAY)
Change-Id: Iafab37d61ecde5c6fdb35a05f18709abc17e8554
The build system currently uses -fPIC for position independent
libraries, and -fpie for position independent executables. However,
these levels are incompatible and conflict when an executable includes
a static lib with the -fPIC flag - such as when building with
LTO. This CL changes the flag for executables to the compatible -fPIE
instead, which is equivalent for all architectures except PowerPC.
Bug: 30227045
Test: ENABLE_CFI=true m -j40 checkbuild # builds and boots
Change-Id: I95b585b553bc00bc1d4f52f4271c5e30e1007d9b
header-abi-dumper: dumps abi exported by source files for Vndk.
header-abi-linker: links abi dumps produced by header-abi-dumper.
header-abi-diff: compares linked dumps.
Test: mm -j64 showcommands > make_log in bionic/libc.
This produced linked dumps in out/soong/.intermediates.
Copied these dumps to
prebuilts/abi-dumps/ndk/current/arm64/source-based/.
Changed the abi and re-ran mm -j64 showcommands > make_log
confirmed that the build reported compatibility breakge without
actually failing (advisory mode).
Change-Id: Iccad6908fe68a80f47230751671d156893b96ead
Use library.shared() instead of !ctx.static() to avoid installing
header libraries when handling installation in soong.
Test: check build.ninja for installed .a files
Change-Id: I8c59d5845dd32419644b7ccdab3c341bc4bf3617
Enable arm_on_x86 mode whenever compiling for x86 on the device,
and either arm is listed as an ABI on the x86 arch, or arm exists
as a target arch.
Bug: 35286489
Test: examine bcc cflags
Change-Id: Iebd0e7b95f584d25773a60474c27425cac7a578e
Prebuilts may already be stripped. Instead of requiring every stripped
prebuilt to be annotated with LOCAL_STRIP_MODULE := false, just make
the default (mini-debug-info) pass through already-stripped modules
without failing.
Bug: 36793128
Test: manual
Change-Id: I9aec008a867eb7df0fbba82b6dd36605dcbf6b9f
There is no need to convert ArchType to a string, it can be used
as a map key directly. It will also be implicity stringified when
passed as a %q parameter to fmt.Errorf.
Test: builds
Change-Id: I5c316fb543108cb88c0c9c1ebafc1bf0050d143e
Builds with no device architectures configured will disable all
device modules, don't run the mutator on them. Avoids panics
in Config.PlatformSdkVersionInt() (because the sdk version is not
set in soong.variables) and in normalizeNdkApiLevel (no arch
mutator was run on the module so arch is "").
Bug: 37315968
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: Iac124e00403eee9f2c1072788e2f51914b0112a5
Nothing changes if BOARD_VNDK_VERSION isn't set.
When the VNDK is enabled (BOARD_VNDK_VERSION in Make), this will split
/system and /vendor modules into two different variant spaces that can't
link to each other. There are a few interfaces between the two variant
spaces:
The `llndk_library` stubs will be available in the /vendor variant, but
won't be installed, so at runtime the /system variant will be used.
Setting `vendor_available: true` will split a module into both variants.
The /system (or "core") variant will compile just like today. The
/vendor ("vendor") variant will compile against everything else in the
vendor space (so LL-NDK instead of libc/liblog/etc). There will be two
copies of these libraries installed onto the final device.
Since the available runtime interfaces for vendor modules may be
reduced, and your dependencies may not expose their private interfaces,
we allow the vendor variants to reduce their compilation set, and export
a different set of headers:
cc_library {
name: "libfoo",
srcs: ["common.cpp", "private_impl.cpp"],
export_include_dirs: ["include"],
target: {
vendor: {
export_include_dirs: ["include_vndk"],
exclude_srcs: ["private_impl.cpp"],
srcs: ["vendor_only.cpp"],
},
},
}
So the "core" variant would compile with both "common.cpp" and
"private_impl.cpp", and export "include".
The "vendor" variant would compile "common.cpp" and "vendor_only.cpp",
and export "include_vndk".
Bug: 36426473
Bug: 36079834
Test: out/soong/build.ninja, out/soong/Android- only changes due to _core addition and
.llndk -> .vendor
Test: attempt to compile with BOARD_VNDK_VERSION:=current
Change-Id: Idef28764043bf6c33dc0d2e7e2026c38867ff769
Soong can rename these automatically for internal use, so don't require
users to set these.
Bug: 33241851
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Merged-In: Ia92356a0ec079f908fd49812231228046783e50d
Change-Id: Ia92356a0ec079f908fd49812231228046783e50d
* GCC and Clang both support this, so we may as well simplify
the logic.
Test: make otapackage
Test: verified that the options are exactly the same, just slightly different order.
Change-Id: I8c2e9f3875cb662db708c799c9ce54f9fdd55981
The vendor image will have more than just proprietary modules in it
under Treble, so let's stop marking open source code as proprietary just
to move it to vendor.
Bug: 36452052
Bug: 37134596
Test: compare build.ninja before/after, no changes.
Test: Set vendor: true, ensure it works.
Change-Id: I44b0ec7007d0e311bdcbd44b238b1ef2d05cc6ff
Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.
Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Test: Inspect out/soong/build.ninja before/after (w/o vndk)
Change-Id: Ic85f07fa10c695b5baab10c41f5e0ad38700bf3d
Clang supports specific CPU targeting and optimization
for Kryo.
This switches us to using the specific Kryo targeting
when Clang is used. For other compilers, we fallback
to cortex-a57 targeting.
Also, move the replaceFirst function to a shared location.
Bug: 36728278
Test: Built and booted sailfish, ran bionic unit tests and art tests.
Test: Disassembled libc.so before this change and after and looked at
Test: the differences. Mostly the results were the order of instructions
Test: changing.
Test: Verified with the clang person (srhines) that our clang has this support
Test: and that it appears to be mostly instruction scheduling changes.
Change-Id: I4ee73d8bcc1e4f5eccb162c18937811fe199b16f
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
This hides a particular symbol from the NDK stubs, while allowing the
symbol to be exposed to the VNDK through the LLNDK stubs. This doesn't
introduce any sort of versioning yet, this will need to change when we
add a new symbol to a new version of the VNDK.
Test: test_gen_stub_libs.py
Test: With my LL-NDK patches, inspecting the generated map files
Change-Id: Iee86aafda7985d6d7a016d0d5ff951505634913b
Instead of using LOCAL_EXPORT_C_INCLUDE_DIRS, use LOCAL_EXPORT_CFLAGS.
This will let us pass -isystem (or potentially other cflags) in the
future. Also refactors the function to be on libraryDecorator instead of
a private lambda so that wrappers can use it.
Test: m -j
Merged-In: Id0dbde7dd03f4e1e1602f7958c445c86f5db15fe
Change-Id: Id0dbde7dd03f4e1e1602f7958c445c86f5db15fe
To allow to inject a wrapper program for compiling java code, let
me allow soong to export JAVAC_WRAPPER.
Test: Set JAVAC_WRAPPER and ANDROID_COMPILE_WITH_JACK=false envs,
Test: and make -j 32
Change-Id: Ib77fe00bd781f8f4ddf965c5e7905eab466a057a
Set LOCAL_NO_NOTICE_FILE so that we don't list them in the third party
notices:
out/soong/ndk/platforms/android-10/arch-arm/usr/lib/libc.so
out/soong/ndk/platforms/android-10/arch-arm/usr/lib/liblog.so
...
These are just stub libraries, and aren't distributed on the device. The
real versions of these libraries will be distributed on the device, and
already have the license information.
Bug: 36867708
Test: Diff aosp_arm's system/etc/NOTICE.html.gz file before/after
Change-Id: Ib647c64e9ce55f700738b00d2ff685e784ed3801
* Use mcpu=cortex-a57, since it is the closest to Kryo.
* Clang doesn't support Kryo as a target yet.
Bug: 36728278
Test: Built and booted a sailfish using Kryo.
Change-Id: Ic0c9588d86fba41896e50e3f0cf0d2b310ffee93
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
* Kryo is closer to Krait than to cortex-a53, so choose Krait defaults.
* Made together with Jake Weinstein (xboxfanj)
Bug: 36728278
Test: Built and boot sailfish set up as kryo.
Change-Id: I04fa0a1dca6f97ae19202d28ee3ce8a59bf169b5
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
This maps to the lowest supported API level for the given
architecture.
Test: make checkbuild # after setting some things to use this
Bug: None
Change-Id: Ied6d44cb2719b73f35dde38a2dca6d3c87c7c924
The NDK stub library generator needs to know what unreleased API
levels exist and what the ordering is between them. This singleton
will later be expanded to generate api-level.h to cut down on
duplication.
Test: make out/soong/api_levels.json && cat out/soong/api_levels.json
Bug: None
Change-Id: I53126dd2cacb67c331c44f7d7c77c98b176b93cd