aboutsummaryrefslogtreecommitdiffstats
path: root/cc
Commit message (Collapse)AuthorAgeFilesLines
* Work around LLVM bug where TLS not emulated in LTO modeStephen Crane2017-08-151-0/+5
| | | | | | | | | | | | | In LTO mode the backend constructs a target exclusively from command line flags, without opportunity to accept code gen arguments from Clang. Clang does not currently pass the -emulated-tls parameter for Android, even though it defaults to emulated TLS for Android in non-LTO builds. Until this is fixed upstream, we can explicitly specify that the LTO output for Android should use emulated TLS. Test: build libandroid with LTO, verified that it uses __emutls_get_address rather than __tls_get_addr. Change-Id: I18acac41aac885fc6635fbd55f96ba7c845eb5e7
* Add LTO support to soongStephen Crane2017-08-153-0/+136
| | | | | | | | | | | | | | | | Enabling the lto property for a module builds that module and all static dependencies with LTO. LTO (link-time optimization) allows the compiler to optimize and generate code for the entire module at link time, rather than per-compilation unit. LTO is required for Clang CFI and other whole-program optimization techniques. LTO also allows cross-compilation unit optimizations that should result in faster and smaller code, at the expense of additional compilation time. Test: make -j12 libc with lto: true for libc Change-Id: Ib8baefedf60e02701d44673a7c473e0845730101
* Pass correct emulation string to goldStephen Crane2017-08-152-1/+2
| | | | | | | | | | | | | | | | | Gold recognizes a different set of emulation strings to specify targets than the bfd linker accepts. Clang only passes bfd emulations to the linker, so we need to override these with the versions accepted by gold when using gold. Gold normally picks up the correct target from the first ELF input file if it cannot parse the emulation parameter. However when using LTO, all objects may be bitcode files, which causes gold to rely on the passed --oformat or -m parameter to determine the proper target. If gold cannot parse the emulation string passed by clang, it fails to link. Test: build LTO version of libc Change-Id: I38e78bb912fd3cc5fb7b4a762284f50ddd4f3998
* cflags for vendor variantsJiyong Park2017-08-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | cflags that are only applied when building the vendor variant of a lib is now supported. This will be particularily useful when existing macro should be turned off for the vendor variant: cflags: ["-DENABLE_FEATURE_X"], target: { vendor: { cflags: ["-UENABLE_FEATURE_X"], }, }, Without this, the library author has to undef the macro inside the source code using __ANDROID_VNDK__, which is not desired especially for external projects. Bug: 64514237 Test: BOARD_VNDK_VERSION=current m -j libsqlite libsqlite.vendor Merged-In: Ib484b5b12e14ab776276a30ed2763dffadc9d642 Change-Id: Ib484b5b12e14ab776276a30ed2763dffadc9d642 (cherry picked from commit 1e7495d973f8fb846d82025be11853031ab1057b)
* a shared lib header is not exported to vendors if it is in exclude_shared_libsJiyong Park2017-08-141-4/+5
| | | | | | | | | | | | | Since a lib in exclude_shared_libs are not used for the vendor variant, it should also be removed from the export_shared_lib_headers. Bug: 62471389 Test: BOARD_VNDK_VERSION=current m -j libxml2.vendor successful (libxml2 has libicuuc in both exported_shared_lib_headers and exclude_shared_libs for the vendor variant) Merged-In: Ic9ddbd7be3c76df563e428ba2409a03bd2e1e113 Change-Id: Ic9ddbd7be3c76df563e428ba2409a03bd2e1e113
* Merge changes Id9717132,I3e3b7251,I021c7971,I8a117a86,Ia5196f1f, ...Treehugger Robot2017-08-123-73/+62
|\ | | | | | | | | | | | | | | | | | | * changes: Allow AndroidMkData.Custom handlers to extend normal values Remove error from AndroidMkDataProvider.AndroidMk Remove error from AndroidMkData.Custom Remove error from AndroidMkData.Extra Bring java support closer to current version of make Rename java_prebuilt_library to java_import
| * Allow AndroidMkData.Custom handlers to extend normal valuesColin Cross2017-08-111-4/+4
| | | | | | | | | | | | | | | | | | Pass accumulated AndroidMkData to AndroidMkData.Custom handlers and expose WriteAndroidMkData so that Custom handlers can write out the normal make variables and then add their own. Test: No change to out/soong/Android-aosp_sailfish.mk Change-Id: Id9717132bbd6c5cf3af8596f3eaa9bbb05d98e40
| * Remove error from AndroidMkDataProvider.AndroidMkColin Cross2017-08-111-21/+26
| | | | | | | | | | | | | | | | It's never anything except nil, and it unnecessarily complicates the implementations. Test: m -j checkbuild Change-Id: I3e3b7251f32ffa84dbdfd0448faf248c306ca808
| * Remove error from AndroidMkData.CustomColin Cross2017-08-111-6/+2
| | | | | | | | | | | | | | | | It's never anything except nil, and it unnecessarily complicates the implementations. Test: m -j checkbuild Change-Id: I021c7971ede3e11bbe08cf1601f4690ed4d1a036
| * Remove error from AndroidMkData.ExtraColin Cross2017-08-112-31/+13
| | | | | | | | | | | | | | | | It's never anything except nil, and it unnecessarily complicates the implementations. Test: m -j checkbuild Change-Id: I8a117a86aa39aeb07d9d8d0686ef869c52784f19
| * Rename java_prebuilt_library to java_importColin Cross2017-08-111-14/+20
| | | | | | | | | | | | | | | | And make it work like bazel's java_import, using a "jars" property instead of "srcs", and allowing multiple jars to be listed. Test: soong tests Change-Id: Ida2ace6412bd77b4feb423646000a1401004e0ea
* | Use --hash-style=both for NDK binariesColin Cross2017-08-111-0/+8
|/ | | | | | | | | Old devices don't support gnu hashes, use --hash-style=both when the sdk_version property is set. Test: m -j checkbuild Bug: 64608507 Change-Id: Iec5229a08fc192f1c8872466ee4bf866adf50443
* Merge changes from topic 'revert_mutator_changes'Vishwath Mohan2017-08-111-47/+29
|\ | | | | | | | | | | * changes: Revert "Fix ASAN mutator." Revert "Don't apply sanitizer mutators to host modules."
| * Revert "Fix ASAN mutator."Vishwath Mohan2017-08-111-49/+24
| | | | | | | | | | | | This reverts commit 12758d0cec5555bb9b5b3a45725a3723987c7314. Change-Id: I475e63d7e56ff166c2046fc423a1729ed098ff66
| * Revert "Don't apply sanitizer mutators to host modules."Vishwath Mohan2017-08-111-3/+10
| | | | | | | | | | | | This reverts commit bba1927bdeccc3ffebab47ee063c53cf89a23de2. Change-Id: Ie895d8eae5abb533468b836639e0835e7adbf8c9
* | Merge "List of VNDK-related libs are exported to make"Treehugger Robot2017-08-117-17/+55
|\ \ | |/ |/|
| * List of VNDK-related libs are exported to makeJiyong Park2017-08-107-17/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LL-NDK, VNDK-core, VNDK-SP libraries are exported to make as SOONG_LLNDK_LIBRARIES, SOONG_VNDK_CORE_LIBRARIES, and SOONG_VNDK_SAMEPROCESS_LIBRARIES. This can be used to auto-generate ld.config.txt from a template. Bug: 64013660 Test: BOARD_VNDK_VERSION=current m -j successful Test: check out/soong/make_vars*.mk and look for SOONG_*_LIBRARIES Merged-In: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d Change-Id: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d
* | Don't apply sanitizer mutators to host modules.Vishwath Mohan2017-08-101-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL blocks modules intended for the host from having the bottom up sanitizer mutator applied. We only maintain a single copy of host binaries, so generating variants doesn't make sense anyway. Additionally, the existing logic was causing an error with builds not embedded in make (eg: aosp-build-tools which uses soong_ui.bash) where the wrong variant was installed on the host. This change should fix that. Bug: 64536751 Test: m -j40 && SANITIZE_TARGET="address" m -j40 Test: aosp-build-tools build breakage is fixed. Change-Id: Ia79b4661f69ce26a7be17c4339c18ca0f397d760
* | Merge "Fix ASAN mutator."Vishwath Mohan2017-08-101-24/+49
|\ \ | |/ |/|
| * Fix ASAN mutator.Vishwath Mohan2017-08-091-24/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL fixes a bug in the ASAN top down mutator which was incorrectly checking (and setting) SanitizeDep to true only for the parent module and not for the visited child modules. Fixing this also requires some changes to the variant creation logic to ensure that the correct variant is passed to make for installation. This will eventually be replaced by logic that appends an appropriate suffix to sanitized libraries (eg: libc++.asan), which will allow both variants to be passed to make. Bug: 64536751 Test: m -j40 && SANITIZE_TARGET="address" m -j40 Change-Id: Id5e5a5946192adf07418dd433bca503047177007
* | Merge "Copy prebuilt binaries"Colin Cross2017-08-091-1/+13
|\ \ | |/ |/|
| * Copy prebuilt binariesColin Cross2017-08-081-1/+13
| | | | | | | | | | | | | | | | | | | | The final name of the prebuilt binary is going to match the basename of the return value of link(), so copy the binary to the intermediates directory to a file name that honors the name and stem properties of the module. Test: manual Change-Id: Ieed4df79b11382924ca0be8e940d3279b45f748a
* | Allow vndk library dependecies to dump abi again.Jayant Chowdhary2017-08-081-1/+1
|/ | | | | | | | | | | | | | | | | | | As a part of the fix for bug 38304436, the condition for dumping abi for a source file was reduced to : if the source file belongs to a library belonging the vndk or the llndk, dump the abi. This needs to be changed back to: if the source file comes through a dependency of a vndk library (static, whole static or source), whether or not the dependency may be vndk-enabled, dump the abi. Test: mm -j64 in external/libcxx. Without the change, libc++ does not produce any abi dump, since it depends on whole static libraries not marked vndk enabled. After the change, libc++ has an abi dump combining abi exposed by whole static, static and source dependencies. Bug: 38304436 Change-Id: Ida3dceeca11342756191f316bee74ea08bcdd984
* Adapt to PLATFORM_VERSION_FUTURE_CODENAMES.Dan Albert2017-08-021-1/+1
| | | | | | | | | | | | | | | Don't preserve the confusing names from make. Rename AllCodenames to ActiveCodenames, add FutureCodenames, and add CombinedCodenames to fetch the *real* AllCodenames. To allow `introduced=P` in NDK library definitions, we need to know that P exists. Use the combined list of current and future API codenames generating stubs. Test: make ndk Test: check out/soong/api_levels.json Bug: None Change-Id: I435f9ce7446236edc268a84e33474044a55a6302
* Merge changes from topic 'ndk-weak-stubs'Treehugger Robot2017-08-012-2/+14
|\ | | | | | | | | | | * changes: Add NDK API codenames for old releases. Add support for weak symbols in the NDK stubs.
| * Add support for weak symbols in the NDK stubs.Dan Albert2017-07-282-2/+14
| | | | | | | | | | | | Test: nose2 Bug: None Change-Id: I202f718103f4a645b1eb83c0a9f5313bcdb4d485
* | Merge "Add support for Exynos-M1"Treehugger Robot2017-08-012-0/+14
|\ \ | |/ |/|
| * Add support for Exynos-M1Junmo Park2017-07-242-0/+14
| | | | | | | | | | Change-Id: Ie57507a5d0ea9101db603ff3538c51853083a314 Signed-off-by: Junmo Park <junmoz.park@samsung.com>
* | Merge "Map cpp_std c++17/gnu++17 to 1z."Treehugger Robot2017-07-271-4/+8
|\ \
| * | Map cpp_std c++17/gnu++17 to 1z.Josh Gao2017-07-261-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | C++17 is basically done, but not rubber stamped yet. Rewrite c++17 and gnu++17 to their 1z equivalents until this happens, and we get a version of clang that allows it. Test: mma in a project with cpp_std c++17 Change-Id: I1626c366c3a9b47c997cc27dc9c5205201ebbdf5
* | | .vendor suffix is added only for libs having core/vendor variantsJiyong Park2017-07-273-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the lib is vendor-only, then .vendor suffix is not added. Furthermore, this change correctly adds .vendor suffix even to the names listed in LOCAL_SHARED_LIBRARIES so that we don't need to add the suffix in the make world. This also allows us to use the original name (without the .vendor suffix) of the vendor-only modules in make (e.g. in PRODUCT_PACKAGES or as a make target). Bug: 37480243 Test: BOARD_VNDK_VERSION=current m -j <name> is successful, where <name> is one of the vendor-only libraries in Soong. (i.e. android.hardware.renderscript@1.0-impl) Test: m -j does not break anything Change-Id: I203e546ff941878a40c5e7cfbb9f70b617df272d
* | | Allow 'vndk' tag in cc_defaultsJustin Yun2017-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | 'vndk' tag must be parsed in cc_defaults as well. Test: build with a module that has 'vndk' tag in cc_defaults. Change-Id: I21a5a831dbf8cae00be98c00f4bb98504da53c8d
* | | Merge "Enable ubsan check flag in build"Colin Cross2017-07-251-3/+0
|\ \ \ | |_|/ |/| |
| * | Enable ubsan check flag in buildliuchao2017-07-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ubsan is currently support ARM/ARM64, so It's OK to enable the build Flag Test: build test module with flags in Android.bp: sanitize: { all_undefined: true, diag: { undefined: true, }, }, BUG:38250996 Change-Id: I37a01b4610132f58315e68335b3c3cdfb148357d
* | | Merge changes I646f303b,I294ca692Treehugger Robot2017-07-223-0/+21
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: Add support for Exynos-M2. Override mcpu option of ToolingCFlags when mcpu is eyxnos-m2.
| * | | Add support for Exynos-M2.Junmo Park2017-07-222-0/+14
| | | | | | | | | | | | | | | | | | | | Change-Id: I646f303b460556a9b36a44574f25dd992d42906c Signed-off-by: Junmo Park <junmoz.park@samsung.com>
| * | | Override mcpu option of ToolingCFlags when mcpu is eyxnos-m2.Junmo Park2017-07-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sAbiDumper uses one year old clang which does not support recent mcpu options like exynos-m2. So, we set mcpu=cortex-a53 for ToolingCFlags. Change-Id: I294ca692181fd2cbc6ba5efb1e4e2d2d605b7a85 Signed-off-by: Junmo Park <junmoz.park@samsung.com>
* | | | Allow arch-specific stl selectionColin Cross2017-07-201-1/+1
| |/ / |/| | | | | | | | | | | Test: m -j checkbuild Change-Id: Ic55433e39b2a0108efcfe980503265ac139b22e2
* | | Don't pass same argument twice for defaults modules initializationColin Cross2017-07-191-4/+4
|/ / | | | | | | | | | | | | | | | | | | InitDefaultsModule and InitDefaultableModule were requiring the module to be passed in as an argument twice, once as a android.Module and once as an android.DefaultableMOdule. Use a type assertion instead. Test: builds Change-Id: I57d721e68a4f016e02c17a678af5f2ba25a9a430
* | Merge "Add to cflags in compilerFlags()"Treehugger Robot2017-07-192-12/+24
|\ \
| * | Add to cflags in compilerFlags()George Burgess IV2017-07-192-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These compiler flags weren't being properly added to ToolingCFlags, which was causing clang-tidy to complain a lot about incompatible redeclarations of library functions. Moving them to compilerFlags() causes them to be added to ToolingCFlags. Bug: None Test: mma in bionic/. clang-tidy now shows 7,142 fewer high-severity warnings. Change-Id: If5148858d9db143a3dd9b0ce6c970258ec4ff9cb
* | | Merge "Install VNDK libs in /system instead of /vendor"Treehugger Robot2017-07-195-14/+171
|\ \ \
| * | | Install VNDK libs in /system instead of /vendorJustin Yun2017-07-185-14/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If BOARD_VNDK_VERSION is set, and a module is set to `vendor_available: true` it is installed in /system and /vendor. However, if the module is a VNDK library, it must be installed at `/system/${LIB}/vndk` instead of /vendor/${LIB}. For those modules, need following to set. vendor_available: true, vndk: { enabled: true, support_system_process: true, }, `support_system_process` is optional to define. If it is defined to true, the module is regarded as vndk-sp. link-type check for VNDK modules is added to make sure that VNDK modules only link to other VNDK shared libraries or LL-NDKs. move the ABI checks to VNDK from all of vendor_available. Bug: 38304436 Test: attempt to compile with BOARD_VNDK_VERSION:=current Test: Use `vendor_available_vndk: true` for VNDK modules and compile with BOARD_VNDK_VERSION:=current Change-Id: I409268e0b7f05a9d01697bf9f9f4726b5aac631f
* | | | Merge "Move default libnativehelper include to mock dir."Treehugger Robot2017-07-192-1/+11
|\ \ \ \
| * | | | Move default libnativehelper include to mock dir.Steven Moreland2017-07-182-1/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also export the corresponding variable to make. libnativehelper's include_deprecated contains all of the headers that are currently used by libraries without the "nativehelper/" prefix. The current count of this is this: 2 ScopedLocalFrame.h 4 JniInvocation.h 4 ScopedBytes.h 5 AsynchronousCloseMonitor.h 6 toStringArray.h 7 ScopedStringChars.h 38 JniConstants.h 41 ScopedPrimitiveArray.h 79 ScopedUtfChars.h 80 UniquePtr.h 100 ScopedLocalRef.h 467 JNIHelp.h Now we can remove each file from the global header include on a file by file basis. Bug: 63762847 Test: libs find their headers Change-Id: Iffc0c1ceb55cc59dc4a70c75d7c0b9ce8397b2cf
* / / / Allow integer_overflow sanitizer path exclusion.Ivan Lozano2017-07-181-1/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for excluding paths from having integer_overflow applied to them when using SANITIZE_TARGET=integer_overflow via an INTEGER_OVERFLOW_EXCLUDE_PATHS make variable. This covers the soong side of the change. Bug: 30969751 Test: Build with SANITIZE_TARGET=integer_overflow SANITIZE_TARGET_DIAG=integer_overflow INTEGER_OVERFLOW_EXCLUDE_PATHS=<path> and confirmed this was no longer being applied to binaries in that path. Change-Id: I298b772f5425da28dff1cf007825be19558db3a8
* | | Merge "Add support for data field in cc_benchmark."android-o-preview-4Colin Cross2017-07-182-16/+29
|\ \ \
| * | | Add support for data field in cc_benchmark.Anders Lewis2017-07-172-16/+29
| |/ / | | | | | | | | | | | | Test: mm -j at source root; Run on blueprint with data in cc_benchmark. Change-Id: I6647fe95c96a6df27a54633f6a520a032487ca97
* / / Add integration testing infrastructureColin Cross2017-07-141-19/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix mutator registration for tests to allow different tests in the same package to register different mutators. Allow tests to track the resulting ModuleBuildParams objects to use in assertions, and provide helpers for getting them. For example: config := android.TestConfig(buildDir) ctx := android.NewTestContext() ctx.RegisterModuleType(...) ctx.MockFileSystem(...) ctx.ParseBlueprintsFile("Android.bp") ctx.PrepareBuildActions(config) ctx.Register() // Get the Inputs value passed to the javac rule for the foo module inputs := ctx.ModuleForTests("foo".Rule("javac").Inputs Test: java_test.go Change-Id: I10c82967f5f3586d2c176f169906b571ed82fc73
* / Fix kernel_headers module registrationDan Willemsen2017-07-101-4/+1
|/ | | | | | | | | This was breaking SANITIZE_TARGET (and likely others) Test: SANITIZE_TARGET=address m -j nothing Test: out/soong/build.ninja is identical before/after Test: out/soong/Android-aosp_arm64.mk is identical before/after Change-Id: Ic0d6774025761ec9ae9240c109895ab8032e4784