aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* soong: extend with lineage board flagsSimon Shields2019-12-111-1/+1
| | | | | | | | | | | | | Includes the following commit: Author: Simon Shields <simon@lineageos.org> Date: Mon Sep 4 21:09:44 2017 +1000 soong: explicitly specify name of Lineage variables struct Change-Id: Ic754b8a13658ddc40620f985581bd1754b780b15 Change-Id: If127c9da6b57340ae57e0cf725151cdcc3c82ef3
* Revert "Revert "Strip libgcc to only keep fallback symbols""Yi Kong2019-05-071-15/+39
| | | | | | | | | | This reverts commit 619cd098b6008d81876f310e2d83ebf141c4061e. Test: manual testing Bug: 130267141 Change-Id: Ie156d4a3255be0ad082cda35c22bac4359852f22 Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 Exempt-From-Owner-Approval: Cherry pick
* Revert "Strip libgcc to only keep fallback symbols"Colin Cross2019-05-061-39/+15
| | | | | | | | | | This reverts commit bd475367c3dcb4478a70409c99b959ebdb117be3. Reason for revert: b/130267141 Bug: 29275768 Bug: 130267141 Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 Change-Id: Ieab56390b27240ef7f2f52a48a673809da7bcf8e
* Strip libgcc to only keep fallback symbolsYi Kong2019-05-031-15/+39
| | | | | | | | | | | | | | We use libgcc as fallback for symbols not present in libclang_rt builtins, however we didn't know what exact symbols were being used, some may not be intended to fallback. Create libgcc_stripped, which only contains unwind symbols from libgcc. Bug: 29275768 Test: bionic-unit-tests Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 (cherry picked from commit acee27cd7236554d0112001c96b9b5790c1c7097)
* Add BUILD_BROKEN_USES_NETWORKDan Willemsen2019-04-091-0/+4
| | | | | | | | | | | | Some people apparently still talk to the network during their build. Allow this temporarily with a BUILD_BROKEN_USES_NETWORK check. Bug: 129992021 Test: attempt to talk to the network during the build with and without this flag. Change-Id: Ifb967c656aa24c4599e7232d0f1b5a303b5bac52 Merged-In: Ifb967c656aa24c4599e7232d0f1b5a303b5bac52 (cherry picked from commit 25e6f09c060fb354839531a15c6ade4dc72e7c58)
* Check package restrictions for Java libs.Vladimir Marko2019-04-091-0/+72
| | | | | | | | | | | Test: m checkbuild; inspect verbose log. Test: Manual - compile with unmet restrictions. Bug: 122937705 (cherry picked from commit 0975ee0de3d2befefa613754b4dd684a1a9b8c0e) Change-Id: Ibecfb53072f060e046d3c8fdca0911d66cc6922d Merged-In: I9360ae8b6d9ce016b7827be5e8ffc6eb521809b7
* Soong: Add unbind option to setup_go_workspace_for_soong.sh scriptPatrice Arruda2019-03-291-43/+308
| | | | | | | | | | | | | | The setup_go_workspace_for_soong now allows the reverse operation of unbinding the directories of the previous operation. Also, refactored the script to easily add more directories to bind/unbind in the future, catch failures on running in subshell commands and a cleaner way to find the repo top directory. Bug: b/129407866 Test: Manually tested by running the script on binding and unbinding the directories. Tested both darwin and linux OS. Change-Id: I7c93230aeab819ab5747e990e95aa26077071d9e
* Merge "Notice support for APEX"Treehugger Robot2019-03-211-0/+49
|\
| * Notice support for APEXJiyong Park2019-03-211-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notice file for an APEX is created by merging notice files for the modules included in it (plus the notice file for the APEX itself if specified). Notice files having the same content are not duplicated; it is emitted only once. Bug: 128701495 Test: m (apex_test is amended) Test: m and inspect $(PRODUCT_OUT)/obj/NOTICE.txt to check there are license entries for /system/apex/*.apex files Change-Id: I169d91038291a6c71615de97cf5b03174afab5d4
* | Add support for no-vendor-variant VNDKVic Yang2019-03-211-1/+17
|/ | | | | | | | | | | | | | | | | | When no-vendor-variant VNDK is enabled, the vendor variant of VNDK libraries are not installed. Since not all VNDK libraries will be ready for this, we keep a list of library names in cc/vndk.go to indicate which libraries must have their vendor variants always installed regardless of whether no-vendor-variant VNDK is enabled. Also add --remove-build-id option to the strip script to facilitate the check of functional identity of the two variants. Bug: 119423884 Test: Add a dummy VNDK library and build with TARGET_VNDK_USE_CORE_VARIANT := true, with the corresponding build/make change. Change-Id: Ieb1589488690e1cef1e310669a8b47a8b8759dac
* Refine error messages in case of missing api filesInseob Kim2019-03-201-0/+33
| | | | | | | | | | | | | Some non-interpretable error messages has been shown in case of missing current api files. Instead of that messy errors, This clearly tells users what is the problem and how to fix it. Bug: 126259114 Test: 1) try to build a sysprop_library and a java_sdk_library without creating txt files under api/, and see it fails. Test: 2) Copy and paste the emitted command, and try to build again. Change-Id: I986781cc710475647c2b996b0f1c51a6f50c0ba2
* Make manifest and APK agree on uncompressed native libsColin Cross2019-02-082-1/+75
| | | | | | | | | | | Only put uncompressed native libs in an APK if the min_sdk_version supports it (>= 23, Marshmallow), and set android:extractNativeLibs="false" in the AndroidManifest.xml so that the platform won't extract them anyways. Bug: 117618214 Test: m checkbuild Change-Id: I760017e48bf3c6b618aabde0982df45995765d48
* Add BUILD_BROKEN_ENG_DEBUG_TAGS to soong.logDan Willemsen2019-02-051-0/+266
| | | | | | | | | And add a helper script that can help parse the output from build_test.bash Test: check for BUILD_BROKEN_ENG_DEBUG_TAGS in soong.log Test: go run ../build/soong/scripts/build_broken_logs.go * Change-Id: Idd0fc8b59770dcdbe44eeba262558708a9497f96
* Use llvm-{strip,objcopy} by defaultYi Kong2019-02-041-12/+10
| | | | | | | | ... except for Darwin Mach-O, as it is not supported by llvm-strip. Test: m checkbuild Bug: 119221035 Change-Id: I021637b6dd3530bff1f563f2ec7c2168e1083b7e
* Switch to clang-r349610Pirama Arumuga Nainar2019-01-311-2/+2
| | | | | | | | | | | Bug: http://b/122481018 The '-keep' option of llvm-strip has changed to '-keep-section'. Update scripts/strip.sh accordingly. Test: Tested on various targets in AOSP and internal branch. Googlers see http://go/clang-r349610-testing Change-Id: Ibfc97ecdcdc305c97a4169cead1e1e3cddda9c4c
* Merge "Rename preferCodeIntegrity to useEmbeddedDex"Treehugger Robot2019-01-302-19/+20
|\
| * Rename preferCodeIntegrity to useEmbeddedDexVictor Hsieh2019-01-292-19/+20
| | | | | | | | | | | | Test: build and run testing app Bug: 112037137 Change-Id: Ia82c2c3ba7eb32117a4be078ac31ee2ba510f9eb
* | Revert "system-clang-format: DontAlign"Tom Cherry2019-01-301-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | "AlignAfterOpenBracket: DontAlign" is explicitly wrong and was not common before. Wrong: int fs_mgr_do_mount(Fstab* fstab, const char* n_name, char* n_blk_device, char* tmp_mount_point, bool needs_checkpoint) { Right: int fs_mgr_do_mount(Fstab* fstab, const char* n_name, char* n_blk_device, char* tmp_mount_point, bool needs_checkpoint) { This reverts commit a4319f7800e2ac7e84ce0fc1599ca33cecc590c8. Test: clang-format works correctly. Bug: 122835115 Change-Id: Icd988070f208e1963bb68651c63fa369cb1e2782
* system-clang-format: DontAlignSteven Moreland2019-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | AlignAfterOpenBracket: DontAlign The main consideration is this: if (foo && .... foo) { // code -> if (foo && .... foo) { // code Change-Id: Ife0073c8544b9554df2eb54e10dc2e7611631299 Fixes: 122835115 Test: manual
* Move system-clang-format to a central location.Steven Moreland2019-01-223-0/+21
| | | | | | | | So that system/core clang-format can be used in more places. Bug: 122835115 Test: manual Change-Id: I233a5003c4229126f37a89e90eac4a75dc5ad104
* manifest_fixer: rename to --prefer-code-integrityVictor Hsieh2019-01-032-19/+19
| | | | | | | | During code review, the name change was suggested. Test: local CTS passed Bug: 112037137 Change-Id: I7eb25210afb45c7477b0d606574048a15c9c721d
* Allow NDK APIs to be marked as drafts.Dan Albert2018-11-281-1/+2
| | | | | | | | | | | Draft APIs are available to the platform and to CTS to allow developers to iterate on an API, but hidden from the NDK artifacts to avoid releasing the API until it is ready. Test: Mark binder_ndk headers and library as drafts, make checkbuild, build-ndk-prebuilts.sh, verify missing from NDK artifact. Bug: http://b/120091134 Change-Id: I8685e92bdaaea581e17fe98e7a2bfb9388f9f132
* manifest_fixer: make --prefer-integrity an enablerVictor Hsieh2018-11-191-1/+1
| | | | | | | | | The last change should have changed this from taking a boolean to a simple switch. Test: build a package with LOCAL_PREFER_INTEGRITY=true Bug: 112037137 Change-Id: I5ce3b1455404b5c8e781496d26c0431db52a170f
* build-ndk-prebuilts: Remove unused device configDan Willemsen2018-10-301-12/+0
| | | | | | | | These are all overwritten by setting Ndk_abis. Bug: 73545680 Test: build/soong/scripts/build-ndk-prebuilts.sh Change-Id: I1c922f5cd1611ed055653d449709fec69dca410b
* Move Ndk_abis from soong.config to soong.variablesColin Cross2018-10-241-6/+3
| | | | | | | | | soong.config is not cleared between builds, which can cause problems when switching between an ndk build and a platform build. Bug: 118398924 Test: OUT_DIR=out_ndk DIST_DIR=dist build/soong/scripts/build-ndk-prebuilts.sh Change-Id: Ifc03a0c25f46625375cdda5723e4a09d7d8050d5
* Add --prefer-integrity option to manifest_fixer.pyVictor Hsieh2018-10-242-0/+63
| | | | | | | | | | | If provided (--prefer-integrity=true/false), the script will set the value in the the manifest. The script will fail if the value mismatches the original in the manifest, if any. Test: scripts/manifest_fixer_test.py Test: aapt dumps the attribute and observe Bug: 112037137 Change-Id: I2b333a7c0747dbcbed4d419f1c9ed46d4a4c98e9
* Remove strip.sh intermediatesColin Cross2018-10-181-0/+1
| | | | | | | | | | | The intermediate files generated by strip.sh --keep-symbols can be very large, and are not useful after the build. Remove them once the final output file has been generated. Saves ~6GB on an aosp_sailfish-userdebug build. Test: m checkbuild Change-Id: I0413f16ac5f423bc1b010cc9b8538f19bdea561e
* android.test.{base|mock} are added as optional libraries.Jiyong Park2018-10-161-5/+11
| | | | | | | | | | | | | | | | | | The two java shared libraries do not exist in the pre-P devices. Therefore, marking the dependencies to the libraries as optional so that an app is still installable to the old devices. This is safe because the classes in the java shared libs exist in other shared libraries (bootclasspath or android.test.runner). Bug: 113800422 Test: run aapt dump badging on the built GtsBackupHostTestCases uses-library tags for android.test.base|mock are with android:required=false, while the same tag for other libs are without the attribute. Change-Id: I266c8efb9686e8975be37f31aea0dc22f82370c3
* Make automatically added <uses-library> entries optionalPaul Duffin2018-10-111-2/+2
| | | | | | Test: run aapt dump badging on build apk Bug: 113800422 Change-Id: I8cdfc3bea0c23e93f44b5707414a7a5a1e3af1c0
* Stop using GCC in toolchain_libraryDan Willemsen2018-10-071-21/+0
| | | | | | | | | Instead, hardcode the ~dozen paths into build/soong/Android.bp, which will unblock removing more GCC support. Bug: 114286031 Test: m Change-Id: I2508432e00b1469141f01e667f3c6a2fe30cd805
* Don't set targetSdkVersion to '1' for librariesColin Cross2018-10-022-3/+8
| | | | | | | | | | | | | | | Setting targetSdkVersion to '1' causes ManifestMerger to add implicit permissions when merging to a higher targetSdkVersion. It should really be unset, but ManifestMerger treats unset targetSdkVersion as 'Q' if minSdkVersion is 'Q' (but not if minSdkVersion is '28'). Set it to something low so that it will be overriden by the main manifest, but high enough that it doesn't cause implicit permissions grants. Bug: 115415671 Bug: 117122200 Test: m checkbuild Change-Id: I1d2d031a21314f6b55d8ea1cc7c4c8e3ecae7f06
* Switch to clang-r339409.Stephen Hines2018-09-261-2/+2
| | | | | | | | | This also changes over llvm-strip to use the -o flag, rather than relying on nonstandard (and no longer functional) positional arguments. Bug: http://b/111998531 Test: Multiple new builds. For googlers - http://go/clang-r339409-testing Change-Id: I8c82d06304af24a001e6552e36e2f540d8e364ce
* Hide warning on static executables in strip.shColin Cross2018-09-191-1/+3
| | | | | | | | | | | | | | Stripping static executables prints a warning: bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-nm: No such file or directory The message is harmless, just hide it. Also turn on pipefail so that the script will exit if the command returns an error. Bug: 24409581 Test: m checkbuild Change-Id: I9647c55c3509e4573e6d4f2f6d88119bdf31e9fb
* Enable toc support for Darwin and WindowsColin Cross2018-09-101-5/+43
| | | | | | Bug: 113936524 Test: m checkbuild Change-Id: I0f2030ad75daae2cbe44e8cbedad329d33df55f7
* Make manifest_fixer.py keep targetSdkVersion high with min_sdk_versionColin Cross2018-09-102-31/+37
| | | | | | | | | targetSdkVersion should stay as "current" when min_sdk_version is set but sdk_version is not. Bug: 112438448 Test: atest CtsTelecomTestCases Change-Id: I11dc27eccd31200d1ce27c7e332106bb825651b4
* Fix manifest_fixer_test.pyColin Cross2018-09-101-30/+31
| | | | | | | Fix tests after I8fcf0c5f452707565ba1808f6fe552ffed055c47. Test: manifest_fixer_test.py Change-Id: Ie55e28b537b960a5e0f4785eda2c0f619b89275c
* Fix inverted logic for objcopy vs. llvm-objcopy with --keep-symbolsColin Cross2018-09-071-2/+2
| | | | | | Bug: 113936524 Test: m checkbuild Change-Id: I958c4277342ed6885714a01bd9f35183ed73eda7
* Allow strip.sh --keep-mini-debug-info to work on non-elf filesColin Cross2018-09-051-3/+4
| | | | | | | | | | | strip.sh --keep-mini-debug-info matches the default for Make, and is currently used on lots of files that are not elf files. For now, just make the behavior match Make and skip files when strip --strip-all fails. Bug: 113936524 Test: m checkbuild Change-Id: I3648c914c0fd7cc9b68aa93fd3cb0b77504d42f6
* Fix strip.sh --keep-mini-debug-infoColin Cross2018-09-051-2/+2
| | | | | | | | | strip.sh --keep-mini-debug-info had extra $$ escaping from when it was copied from make. Bug: 113936524 Test: m checkbuild Change-Id: I47dec958152584ca94c6149b11a06e64be2f22f9
* Merge "Support setting android:usesNonSdkApi in manifest_fixer.py"David Brazdil2018-08-312-0/+66
|\
| * Support setting android:usesNonSdkApi in manifest_fixer.pyDavid Brazdil2018-08-282-0/+66
| | | | | | | | | | | | | | | | | | 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
* | Clean up darwin cc toolchainDan Willemsen2018-08-281-1/+0
|/ | | | | | | | | | 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
* Add clang-tidy.sh to filter out troublesome flags.Chih-Hung Hsieh2018-08-221-0/+37
| | | | | | | | | | | | | | * Some flags are accepted by clang but not clang-tidy. They could cause the diagnostic-unused-command-line-argument warning. Flag -flto messed up the -I flags. * Add clang-diagnostic-unused-command-line-argument to default clang-tidy checks. * Move CLANG_TIDY_UNKNOWN_CFLAGS to build/make/core/clang/tidy.mk. Bug: 111850071 Bug: 111885396 Test: build with WITH_TIDY=1 Change-Id: Iabeeb27715acf83ef6aafe3e77206b9a01a0d889
* Set targetSdkVersion in manifest_fixerColin Cross2018-07-262-35/+113
| | | | | | | | | | | | | | | If targetSdkVersion is not set in the manifest, set it to the value it was implicitly using before changing minSdkVersion. Requires passing --library to manifest_fixer.py to distinguish between apps, where the implicit value was set by aapt2 to current, or libraries where the implicit value was 1. Fixes cases where the manifest does not specify targetSdkVersion and was inheriting the minSdkVersion value until manifest merger started merging a lower targetSdkVersion value from a library. Bug: 111347801 Test: manifest_fixer_test.py Change-Id: I8fcf0c5f452707565ba1808f6fe552ffed055c47
* Add a unified status reporting UIDan Willemsen2018-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new status package that merges the running of "actions" (ninja calls them edges) of multiple tools into one view of the current state, and gives that to a number of different outputs. For inputs: Kati's output parser has been rewritten (and moved) to map onto the StartAction/FinishAction API. A byproduct of this is that the build servers should be able to extract errors from Kati better, since they look like the errors that Ninja used to write. Ninja is no longer directly connected to the terminal, but its output is read via the protobuf frontend API, so it's just another tool whose output becomes merged together. multiproduct_kati loses its custom status routines, and uses the common one instead. For outputs: The primary output is the ui/terminal.Status type, which along with ui/terminal.Writer now controls everything about the terminal output. Today, this doesn't really change any behaviors, but having all terminal output going through here allows a more complicated (multi-line / full window) status display in the future. The tracer acts as an output of the status package, tracing all the action start / finish events. This replaces reading the .ninja_log file, so it now properly handles multiple output files from a single action. A new rotated log file (out/error.log, or out/dist/logs/error.log) just contains a description of all of the errors that happened during the current build. Another new compressed and rotated log file (out/verbose.log.gz, or out/dist/logs/verbose.log.gz) contains the full verbose (showcommands) log of every execution run by the build. Since this is now written on every build, the showcommands argument is now ignored -- if you want to get the commands run, look at the log file after the build. Test: m Test: <built-in tests> Test: NINJA_ARGS="-t list" m Test: check the build.trace.gz Test: check the new log files Change-Id: If1d8994890d43ef68f65aa10ddd8e6e06dc7013a
* Fix error in build when OUT_DIR_COMMON_BASE is usedPeter Kalauskas2018-07-101-8/+20
| | | | | | | | | | | | | Without this change, gen-kotlin-build-file.sh will generate kotlinc-build.xml file with path that look like: /path/to/aosp-top//path/to/aosp-out/soong/.intermediates/... Also fixed a couple lint errors. Test: Set OUT_DIR_COMMON_BASE and was able to build Bug: 111309264 Change-Id: I86173571667deca79ee0d9a7324715c9a0e4cd97
* add --uses-library option to manifest_fixer.pyJiyong Park2018-06-202-9/+163
| | | | | | | | | | | | | `--uses-library foo` adds <uses-library android:name="foo" android:required="true"/> element to the manifest. When there is already a uses-library element with the same name, then the hand-written element is respected. Test: m -j Test: build/soong/scripts/manifest_fixer_test.py Change-Id: Ia5e989d3c3c3fba7cc9015a6d16dac70464282a8
* Add a script to inject values into manifestsColin Cross2018-06-142-0/+342
| | | | | | | | | | | | | | | | | Add a script that can inject a <uses-sdk minSdkVersion=""> into AndroidManifest.xml files. This will help with merging LOCAL_STATIC_ANDROID_LIBRARIES, because ManifestMerger treats a missing minSdkVersion as minSdkVersion=1 and throws errors if libraries use a larger minSdkVersion. It will also help with cases where an app has a manifest that specifies an old minSdkVersion, but the build system is compiling the app in a way that is not compatibile with old devices, for example using a newer dex format. Bug: 110167203 Test: m java Test: build/soong/scripts/manifest_fixer_test.py Change-Id: I528d71a225feb86464c530e11b223babb0ea9edf
* Use llvm-{objcopy,strip} when clang lld is used.Chih-Hung Hsieh2018-06-071-13/+57
| | | | | | | | | | | | | | * 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
* Fix mac sdk buildDan Willemsen2018-06-031-2/+2
| | | | | | | | Use the host platform "strip", and also expose "nm" and "otool" used for toc. Test: `m PRODUCT-sdk-sdk` on Mac Change-Id: I7a6d127f479d3e563385ead46bc3a4b49b99776b