aboutsummaryrefslogtreecommitdiffstats
path: root/cc/makevars.go
Commit message (Collapse)AuthorAgeFilesLines
* Blacklist code for CFI.Vishwath Mohan2017-02-151-0/+3
| | | | | | | | | | | | | Adds the -fsanitize-blacklist option for CFI, using the built in blacklist at external/compiler-rt/lib/cfi/cfi_blacklist.txt. Also refactors the CFI cflags and ldflags into cc/makevars.go to ensure they're consistent across Soong and make projects. Bug: 30227045 Test: ENABLE_CFI=true m -j40 builds and boots. Test: The blacklist prevents runtime errors that otherwise occur. Change-Id: I91c5420478e7290061d89338a86abdef69c67fe2
* Add RenderScript toolchain information to soong.Jayant Chowdhary2017-02-071-0/+7
| | | | | | Test: make -j64 from top of tree. Change-Id: I9e853e64924f26719c0cd7ae8de4958fe97ca04e
* Add c_std and cpp_std properties.Dan Albert2017-02-031-0/+2
| | | | | | Test: Checked showcommands ouput for each setting. Bug: None Change-Id: Ibe02352f19ca2777b9a419136270e5c4390f1149
* Export LLVM_RELEASE_VERSIONDan Willemsen2016-12-141-0/+1
| | | | | Test: m -j libc; check out/soong/make_vars-*.mk Change-Id: Ic29407d8b2ecc69f8d95102bca81bec3f0c5012b
* Support aidl cpp generationDan Willemsen2016-12-051-0/+2
| | | | | | | | | Ideally we'd calculate the headers that are written here too, but I'll add that in a later change that actually enforces the generated header list. Test: mmma -j system/tools/aidl Change-Id: Ifd2e8e8ff444b0f67270fb5156e7bf7bceddb6be
* Add basic VNDK support in SoongDan Willemsen2016-11-281-0/+7
| | | | | | | | | | | | | | | | | | Export a list of libraries in the VNDK, which is currently empty. Take in Make's global BOARD_VNDK_VERSION, and use that as the SDK version for modules that specify use_vndk: true. Modules that use the vndk have some configuration as if they were building against the NDK (the absence of globally defined headers), but in other cases look like platform modules (using the platform libc++, for now). This change does not attempt to enforce any linking constraints, that will come in a later patch. Test: out/soong/build.ninja doesn't change Change-Id: I3be206b67015ac5177b7eef4a451c579e3dc903f
* Add clang-tidy supportDan Willemsen2016-10-311-0/+13
| | | | | | | | | | | | | | | | For every file which we can run clang-tidy (C/C++ clang-built), we add a new build node that depends on the object file (since clang-tidy does not export a depfile), and is depended on by the link step. This is better than how we're doing it in make, since calling tidy can be turned on or off without needing to rebuild the object files. This does not attempt to port WITH_TIDY_ONLY from Make, since the way that it works is broken (due to the lack of a depfile). Bug: 32244182 Test: WITH_TIDY=true mmma -j bionic/libc Test: ./soong (Setting ClangTidy: true) Change-Id: I40bbb5bb00d292d72bf1c293b93080b5f9f6d8ea
* Consolidate -std flagsColin Cross2016-10-181-0/+4
| | | | | | | | Define the default -std values in global.go, export them in makevars.go, and use them in compiler.go. Test: builds Change-Id: Ia2ae01f63e182d0ad7f371e6d32184bff35a8897
* Export asan configuration to makeDan Willemsen2016-10-131-0/+4
| | | | | Test: Ninja files for ASAN'd aosp_flounder-eng identical Change-Id: Ib29cac0bc391dadd9ff27992c7b356415182767f
* Consistently use -std=gnu99 for gcc as well as clang.Elliott Hughes2016-10-131-2/+3
| | | | | | | | | | This matters for C files that are also built for Windows. Previously they'd be compiled with -std=gnu99 for the host but [effectively] -std=gnu89 for Windows. Bug: http://b/32019064 Test: builds, and can build libcrypto_utils without a manual -std= line Change-Id: I9c5cc7832220b5c3d6a007ff10d076e26fd8c75d
* Split CommonGlobalIncludes for system includesColin Cross2016-09-151-1/+1
| | | | | | | | Split CommonGlobalSystemIncludes out of CommonGlobalIncludes in preparation for moving global includes from -isystem to -I. Bug: 31492149 Change-Id: Ib935ea038cdbf9515dc2ab68d7fff924c370906a
* Sort NDK_MIGRATED_LIBS in make_varsDan Willemsen2016-09-141-0/+2
| | | | | | | | Otherwise this was changing every time, and causing Kati to find make_vars-*.mk different every time. Test: with https://android-review.googlesource.com/274439 Change-Id: I731b3b2fd434314bf6e8b7c2ec5310b9623512a5
* Add ubsan_standalone library name to the toolchain.Evgenii Stepanov2016-08-151-1/+2
| | | | | | | | | | and export the library name to make. Refactor the code a bit to avoid repeating the library name multiple times. Bug: 22033465 Test: Ran external/clang/build.py for aosp-llvm Change-Id: I25eb3858eb92e1dd493b09524d559802551b2547
* Move toolchain and global variables into separate packageColin Cross2016-08-011-23/+24
| | | | | | Move all of the configuration into a cc/config package Change-Id: If56fc7242062ed1ce3cb297f78a1e0ef7537373c
* Generate NDK sysroots from the platform build.Dan Albert2016-07-281-0/+3
| | | | | | | | | | | The list of migrated libraries is currently empty. Libraries will be migrated as follow up patches. Test: Migrated libc to this system and everything still builds. build.ninja shows libraries being built and used and headers are collected for the sysroot. Bug: http://b/27533932 Change-Id: Iaba00543c1390f432befe0eed768ed3fbb8a9b96
* Rename exported make variables for system headersColin Cross2016-07-201-1/+47
| | | | | | | | | Add SYSTEM_ to variables that contain headers that are used with -isystem, and split -I and -isystem variables into separate make variables. Also export SRC_HEADERS and SRC_SYSTEM_HEADERS to compare against make. Change-Id: I02097c35d1d5342ebce8311d8878fff33b118adb
* Support linking against NDK prebuilt librariesDan Willemsen2016-07-081-0/+1
| | | | | | | When sdk_version is specified, we need to use the prebuilt ndk versions of these libraries instead of the platform versions. Change-Id: I4ff33a234a985041ebe11ab148d64d0f8df66fc4
* Remove support for libstdc++ on Android/Linux/DarwinDan Willemsen2016-06-151-2/+0
| | | | | | | It's now only supported on Windows, where we don't have libc++ support yet. Change-Id: I64891b7558d3d2942588687017a0c2f695c18d5c
* Simplify arch target handlingColin Cross2016-06-021-35/+46
| | | | | | | | | | | | Soong's multi-architecture building has grown complex, with the combination of HostOrDevice+HostType+Arch necessary to determine how to build a variant of a module, and three separate mutators to split each into its variations. Combine HostOrDevice+HostType into Os, which will be Linux, Darwin, Windows, or Android. Store Os+Arch as a single Target. Change-Id: I92f2e2dac53617d595a35cc285d2bd348baa0fbd
* Revert "Simplify arch target handling"Colin Cross2016-06-031-46/+35
| | | | | | This reverts commit 6713fb26cbcadf525cd75e47d7d0cbc23d282b3e. Change-Id: Ic473cea2563b0b37dc08b0bc5d3a0ac8c4b6afe6
* Simplify arch target handlingColin Cross2016-06-021-35/+46
| | | | | | | | | | | | Soong's multi-architecture building has grown complex, with the combination of HostOrDevice+HostType+Arch necessary to determine how to build a variant of a module, and three separate mutators to split each into its variations. Combine HostOrDevice+HostType into Os, which will be Linux, Darwin, Windows, or Android. Store Os+Arch as a single Target. Change-Id: Iae677eff61a851b65a7192a47f2dc17c1abb4160
* Export GLOBAL_[CLANG_]C[PP]FLAGS_NO_OVERRIDE to MakeDan Willemsen2016-05-271-0/+5
| | | | Change-Id: I7f2f37f63720244eb1f3340804c00ae82d36e90b
* Export TARGET_TOOLCHAIN_ROOTDan Willemsen2016-05-261-0/+1
| | | | | | This is still used by brillo to find GCC for the kernel build. Change-Id: I19238b1cc9c4220224048afebbdf6032015c3e89
* Stop sorting (C|CPP|LD)FLAGS when checkingDan Willemsen2016-05-231-8/+8
| | | | | | | Make isn't defining these anymore, so we don't need to sort them before comparing. Change-Id: Ia2f13f665309569ee8c564a8fb82639d174a83bb
* Fix and check CLANG_CONFIG_UNKNOWN_CFLAGSDan Willemsen2016-05-201-0/+1
| | | | Change-Id: Id8d4ab5e7bf7c9ed161596c19ccdfe00aaa2f7c6
* Check more Make variablesDan Willemsen2016-05-201-0/+28
| | | | | | | | | Some more common makevars methods were required in order to remove the "-isystem" prefixes from the toolchain.IncludeFlags() value. In Make, the -isystem is prepended at time of use, not in TARGET_C_INCLUDES itself. Change-Id: If07e69ddb7357d11c7dd48ab60f503d219f29de8
* Fix makevars (C|LD)FLAGS orderingDan Willemsen2016-05-181-8/+7
| | | | | | | This better matches the order from cc/cc.go, so that any implicit ordering behaves the same in Make and Soong. Change-Id: I802d725f037a22c4b2f0ae28258af95efa37ce79
* Rename common to androidColin Cross2016-05-181-17/+17
| | | | | | | | | | | | | | | | Rename the "common" package to "android", because common is too generic. Also removes all android.Android naming stutter. Ran: gomvpkg -from 'android/soong/common' -to 'android/soong/android' gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext' gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext' gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase' gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext' gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext' gorename -from '"android/soong/android".AndroidModule' -to 'Module' Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7
* Fix Static_executable, implement BUILD_HOST_static from MakeDan Willemsen2016-05-171-11/+15
| | | | | | | | | | Static_executable was still using ModifyProperties, and was otherwise missing things. Fix all of that up, and implement HostStaticBinaries, which is the equivalent of BUILD_HOST_static in Make. That will default host binaries to be static, which is useful for building SDK tools to run with incompatible C libraries. Change-Id: I2a62181b5d854b310edc8ae7a6bcbd30b89e7463
* Export CONLYFLAGS and CPPFLAGS to MakeDan Willemsen2016-05-171-0/+10
| | | | Change-Id: I061d531983b5bb544efb2f0ab5912cd2b461f58b
* Export -D__BRILLO__ to make if necessaryDan Willemsen2016-05-161-0/+8
| | | | | | Fixes Brillo builds Change-Id: Ia3563b0c9e000d95ed18d05460f5c8c32e04e191
* Turn on strict checking for C[PP]FLAGS make varsDan Willemsen2016-05-161-4/+4
| | | | Change-Id: I8448feb55b54515856798c1b3e8070d0e07e0b6c
* Don't use -B...gcc.. on DarwinDan Willemsen2016-05-161-1/+4
| | | | | | | | We don't ship binutils on Darwin, so there is no point in telling clang to look in that path. (The path being used doesn't even exist). This matches the Make behavior. Change-Id: I663047057ff8df8a349483532da8018af13d50d8
* Add more make-exported variablesDan Willemsen2016-05-161-0/+17
| | | | Change-Id: I6b7a30624923b8ca879d4ac7a3f1f11aec9b9b8a
* Publish Soong configuration to Make variablesDan Willemsen2016-05-121-0/+111
For configuration like TARGET_GLOBAL_CFLAGS, it would be good to have Make and Soong use the same values. This change adds an interface for packages like cc to verify the current value of make variables match the Soong equivalents, and once they're satisfied with the results, remove the make definition and use the value from Soong. The cc implementation exports a few variables currently that I expect to match between both implementations in all cases. It also checks {CLANG,}{HOST,TARGET}_GLOBAL_{C,LD}FLAGS, which should be mostly similar between make and soong now. Bug: 23566674 Change-Id: Idc8582ef31ace11a8baefcf525c3683f08a573aa