This commit cleans up `createVndkSourceAbiDump()` and renames it to
`shouldcreateVndkSourceAbiDump()`.
Test: lunch aosp_walleye-userdebug && make
Change-Id: Iff4379e2812c4b5c5baff288b938eed5d92e024f
Fixed a bug that recovery variant of a module is not created on 32-bit
targets. The bug was happening because the creation of the recovery
variant relied on DevicePrefer32BitExecutables() which returns false
for 32-bit only targets.
Now, recovery variant is checked against the primary architecture of the
device that is returned by DevicePrimaryArchType().
Test: m -j adbd.recovery on aosp_arm and aosp_arm64
adbd is built under recovery/root/system/bin and it is ELF32 and ELF64,
respectively for the targets.
Test: m -j libc.recovery on aosp_arm, aosp_arm64, aosp_sailfish
and the x86+arm target in mater. Only one libc.so is installed
under recovery/root/system/lib (or lib64).
Change-Id: I83a248d81f2c71dcfb0e9d887a75b71338f27b4d
This reverts commit c729b508c3.
Reason for revert: New breakages fixed
Change-Id: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
Merged-In: I8b5e597fdb2af782d591ddcf5b4e7534273a2e7b
Bug: http://b/62424007
This breaks 64-bit Windows executables. Probably due to the Clang
migration, the entry-point need not be set even for 32-bit executables.
Test: 32-bit and 64-bit aapt2_tests.exe and ziparchive-tests.exe can
start. (There are some failed tests, though).
Change-Id: Id3a7d3d2802f6b671332afff4558840bdabddeb5
Bug: http://b/69933068
- Remove GCC's intrinsic header path so Clang's headers get included.
- Add '-B' with GCC's binary directory so Clang detects the linker.
- Bug: http://b/109759970 - Pass '--allow-multiple-definition' linker
flag to deal with ld.bfd's inability to handle Clang-generated section
names is fixed.
- Bug: http://b/110800681 - lld cannot link Android's Windows modules
yet
Test: m native-host-cross and run adb_test.exe under wine.
Change-Id: I9be9cfc34a47cbeee04024438dea214305112eaa
Bug: http://b/69970955
With the MinGW prebuilts update (http://aosp/709402), executables get a
runtime dependency on libgcc_s_sjlj-1.dll with both gcc and Clang.
Passing -static-libgcc removes this dependency and is a better option
than having to package an extra dll with executables.
Test: Run gcc-built adb_test.exe under wine
Change-Id: I18e5fadb1b8ace510ae684e2d4cfa7fe7d007cff
VisitDepsDepthFirst is almost never correct, as it can't query
dependency tags of multiple dependencies between the same two modules.
Replace VisitDepsDepthFirst with WalkDeps in sanitize.go and
python.go. Also verify the dependency tag before continuing to
recurse to ensure that they don't recurse through genrules and into
unrelated modules.
Test: m checkbuild
Change-Id: I2f7560126f56b51a40ec39dfbdcc18b5891489f7
Scudo is a hardened usermode allocator that is part of LLVM's compiler-rt
project (home of the Sanitizers). clang allows for -fsanitize=scudo as a
possible command line option to link the shared Scudo library to a binary.
This patch add Scudo as a potential sanitize option. Scudo is not compatible
with ASan and TSan and will be disabled if either is enabled.
Bug: 72112048
Test: aosp compiled with m -j
Test: local experiment with scudo: true to ensure that a test target
(tombstoned) could be linked with scudo.
Change-Id: I76bb6c60891d4782f6665a112c4c2bf7c31645da
To save space in the recovery partition, modules installed to the
partition are restricted to be built in the first architecure (i.e.,
32bit for 32bit-only device or when TARGET_PREFER_32_BIT is true, and
64bit otherwise).
Most notably, this change removes the 32-bit variant of the linker
(about 1MB). The linker was installed regardless of whether there is a
32-bit executable or not. Now, the unnecessary linker is not installed
and it is guaranteed that all modules in the partition are built with the
same architecture.
Bug: 79146551
Test: m -j
Test: out/target/product/<name>/recovery/root/system/bin/ has only one
variant of the linker.
Change-Id: I4070a43555bad4cfa8eff5253b09dcd004ea8251
VNDK-Ext are modules with `vndk.enabled: true` but not having
`vendor_available: true`. In addition, VNDK-Ext should be checked by
source ABI checker. This change fixes the regression introduced in
Bug: 110142940
Test: Create libminijail_ext, break some ABIs, and see an error.
Change-Id: I8b47ac12d2e132f641129c9549ed22c3971d6c89
Recovery variant of a module is now by default built with
-D__ANDROID_RECOVERY__, thus eliminating the need to define a custom
macro to conditionally compile the module for the recovery mode.
(Of course, they can define their own macro if needed)
Bug: 63673171
Test: m -j
Change-Id: I1d1b990329793472b93c2f56080e72d690eef9ec
Recovery partition has same layout as system. In other words,
executables are installed to <recovery_root>/system/bin and libs are
installed to ../system/lib.
This is made possible because the recovery partition is now
self-contained, i.e., shell, adbd, etc. are hosted in the recovery
partition and thus we no longer has to mount the real system.img
to /system. So /system is now available to executables built for
recovery mode.
Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: Select 'mount /system' in the recovery mode, then `adb shell`.
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.
Change-Id: I6c4f903ad21fd3dd10a07c4588be85d3d678c099
For a vndk_prebuilt module that was built with 32 bit binder, add
"binder32bit: true" to its Android.bp module.
This will add .binder32 suffix to the name.
Bug: 74362637
Bug: 80450527
Test: m -j vndk_snapshot_package
Change-Id: I81049adbf5e67fe5e63d5ea3a8b027aaf6eb355b
* Pass LLVM_{OBJCOPY,STRIP} to makefile rules.
* strip.sh is used only in soong-only mode.
It will use llvm-strip and and llvm-objcopy
when --use-llvm-strip is given.
Keep flags of strip.sh in alphabetic order.
* Tested build/soong/scripts/build-ndk-prebuilts.sh
by adding "UseClangLld": true, to soong.variables file.
Bug: 80093681
Test: build/soong/scripts/build-ndk-prebuilts.sh
Change-Id: I612267304eea434c7a33cc086b27b577d5f64094
Modules may have multiple variants for each architecture, and
SOONG_GEN_CMAKEFILES=1 was generating CMakeLists.txt for all of
them, overwriting the first normal variant with the last (and
likely least normal) variant.
Keep a map of generated CMakeLists.txt files, and only generate
each one once.
Bug: 72283227
Test: m SOONG_GEN_CMAKEFILES=1
Change-Id: If31087264d2809088fe36965b9a0ff0f44089852
SourceDepTag is going to become a set of tags of the same type
instead of a single tag, remove references to it outside the
android module.
Bug: 80144045
Test: soong tests
Change-Id: I00b2ea5040e4fc95dfbfdd79e21579853c478fcb
Every time the toolchain adds a new warning, we had to suppress the
warning in every external projects that violates it, or disable it
globally -- which we end up doing most of the time since the first
option is way too time consuming.
Add a separate cflags option for external projects and move existing
-Wno-* flags there so that we can enforce better code quality for
internal projects.
TODO: Move more -Wno-* flags to ClangExtraExternalCflags
Test: m checkbuild
Change-Id: If3dee491616a1e7ba6223c2f522d100e10c5ee76
Use the host platform "strip", and also expose "nm" and "otool" used for
toc.
Test: `m PRODUCT-sdk-sdk` on Mac
Change-Id: I7a6d127f479d3e563385ead46bc3a4b49b99776b
atree was using the host's strip tool during sdk generation, so expose
the prebuilt for use instead.
`id` was used with a test running minijail0 during the build
`sha1sum` is used by development/build/tools/mk_sdk_repo_xml.sh
`rmdir` was being used to remove some tmp files
Test: m PRODUCT-sdk_arm64-sdk dist sdk_repo
Test: Run other builds through forrest
Change-Id: I49c756a3e9497c0bbd9030754e6aa193a2d989a4
Unlike the old version of this (which has been renamed to
verioned_ndk_headers), this module includes a property to specify the
preprocessor to be used.
This is going to be used for preprocessing ICU4C's unicode/uconfig.h
to alter a config value that needs to differ between the platform and
the NDK.
Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/548
Change-Id: If5c6f54f90cf5a4187693a941748d72f39b0d797