aboutsummaryrefslogtreecommitdiffstats
path: root/cc
Commit message (Collapse)AuthorAgeFilesLines
* Use correct install paths in generated Android.mkColin Cross2016-03-242-2/+15
| | | | | | | Extract Soong's install path and put it in the generated Android.mk file so that tests get installed in the correct place. Change-Id: Id4726855c5677855406de20773a5da533bdd4cea
* Refactor ccColin Cross2016-03-214-1142/+1403
| | | | | | | | | | | | Refactor all of cc in order to use composition instead of inheritance. All cc module types exported by cc are now *cc.Module objects, with compilation, linking, and installing steps delegated to different objects in order to form the full module type. Additional features that modify dependencies and flags can be inserted in a features object list, and custom module types can be created by adding a Customizer object that can modify properties. Change-Id: Ie1283d14920f7856f6947b0530606b2f4d58fab0
* Update clang version to 2690385Colin Cross2016-03-211-1/+1
| | | | | | Matches changes in I1226f24b50319e321ea538362b2f26fcd227ca39 Change-Id: Iecb2c7388d91fe9975dbe035b5ce6fec8d32a435
* Allow overriding of Clang prebuiltsDan Willemsen2016-03-161-1/+14
| | | | | | | | | | | | These are the environment variables used by make to override the llvm/clang prebuilts. As far as I know, these should only be used when building or testing a new clang drop. I would have this handled by make and put in soong.variables, but I expect this to be one of the first options removed from make and exported from Soong to Kati. Change-Id: I7a3a70ee44fc4b1e56a5e200e2a7ced77d4c5692
* Propagate missing dependencies when using whole_static_libsDan Willemsen2016-03-111-0/+18
| | | | | | | | Currently, whole_static_libs with missing dependencies are silently ignored. Instead, when getting the object files from the other module, add its missing dependencies to the current module. Change-Id: I12472dede2dfafdded56268bfd37f60063b637c4
* Switch to clang-2658975Dan Willemsen2016-03-111-1/+1
| | | | | | Port of https://android-review.googlesource.com/206366 Change-Id: Ife2e0ab84de839ea73744cb65f995a11e3145304
* OSX: Use the oldest SDK, but always set our target to 10.8Dan Willemsen2016-03-091-9/+7
| | | | | | | | | | Build binaries usable on older machines even if older SDKs are not installed. Older SDKs can no longer be installed on newer Xcode versions. Port of https://android-review.googlesource.com/207242 Change-Id: If66f2eef7593bce9fb858fc7b71369f55dd362e4
* Fix C++ on DarwinDan Willemsen2016-03-093-15/+37
| | | | | | Port of https://android-review.googlesource.com/207241 Change-Id: Idad81a528a2104579de0225b0724bb81293eea44
* Swap -lm and -lpthread for host libc++ usersDan Willemsen2016-03-031-1/+1
| | | | | | Match the order we use in make. Change-Id: I7959f72841bd058b13d6c8fc6efb3c78b5de9d35
* Do not use -Wl,--gc-sections for linux host librariesDan Willemsen2016-03-031-2/+4
| | | | | | This matches make Change-Id: I2ee2e47065439afa02b946ede3a7718f1a8dc71b
* Reorder extra clang host flagsDan Willemsen2016-03-032-10/+10
| | | | | | | | | | | In make these clang-specific flags are marked as EXTRA and added after the common flags. This was causing differences between compiled objects in make and soong because -fstack-protector-strong was before -fstack-protector in soong instead of after. Change-Id: I59dd6dcfdaf5ec9184a09e79efe80b62cfe48dbb
* Port GLOBAL[_CLANG]_CFLAGS_NO_OVERRIDE from makeDan Willemsen2016-03-033-0/+23
| | | | Change-Id: I4f0f8ec7620e4477f60bf9cf1ae0c005470c89d4
* Add a global define for non-external code.Dan Willemsen2016-03-021-0/+16
| | | | | | Soong port of https://android-review.googlesource.com/204887 Change-Id: I15faf62cec1932dd859a082f66942b2606d0ff45
* Merge changes Ife723733,I68acfb53,Id216c35d,Id0569831,Iadac88f8, ...Dan Willemsen2016-03-022-2/+3
|\ | | | | | | | | | | | | | | | | | | * changes: Add system/media/audio/include to commonGlobalIncludes Add -Werror=date-time to target builds DeviceUsesClang should default to true clang now supports -fdebug-prefix-map=. Turn on ninja errors for duplicate rules Update to use the latest clang-2629532
| * Add system/media/audio/include to commonGlobalIncludesDan Willemsen2016-03-011-0/+1
| | | | | | | | | | | | This list now matches the make build system. Change-Id: Ife723733f269bdcc00a0c2e9096e3e2cb7e6f88e
| * Add -Werror=date-time to target buildsDan Willemsen2016-03-011-0/+1
| | | | | | | | | | | | Soong port of https://android-review.googlesource.com/195464 Change-Id: I68acfb53be962ffd5c488337517dadb950a13b6f
| * clang now supports -fdebug-prefix-map=.Dan Willemsen2016-03-011-1/+0
| | | | | | | | | | | | Soong port of https://android-review.googlesource.com/204111 Change-Id: Id0569831f09845871d8e6990c310516bea5a2510
| * Update to use the latest clang-2629532Dan Willemsen2016-03-011-1/+1
| | | | | | | | | | | | Soong port of https://android-review.googlesource.com/204812 Change-Id: Ib6c94bc57f7145c1cc9b14338126132fc4648509
* | Generate .c for .y and .lDan Willemsen2016-03-011-21/+22
|/ | | | | | Soong port of https://android-review.googlesource.com/195737 Change-Id: I9ab6dc149c258f7642bc36c3fa32f90ff7ee51a4
* sandybridge setup: no AES_NI, AVX, MOVBEDan Willemsen2016-02-292-6/+2
| | | | | | | | | Sandy Bridge actually doesn't have all of these options. For example AVX is only available on the higher-end SKUs (not on Celeron G550). Soong port of https://android-review.googlesource.com/204730 Change-Id: Ib595a9a6b464626d0c88525c6aaa4d69176645cc
* Refactor Android.mk generationDan Willemsen2016-02-091-25/+31
| | | | | | | | | | | | | | | | | | | Now, instead of combining multiple binaries into a single BUILD_PREBUILT definition, use separate instances for every module variant. This fixes HOST vs HOST_CROSS prebuilts, and should be saner overall. From make, these should look the same, we're only just using one instance of prebuilt_internal per BUILD_PREBUILT call instead of multiple. With that simplification, we don't have to store as much state, and can directly write into the buffer. Also switch from io.WriteString to fmt.Fprintln, which will require fewer explicit string concatentations, and we don't need to worry about newlines. Allow the module-provided functions to return errors. Change-Id: If30453b21fa21387f635626618d8fabfc78e6859
* Add windows x86_64Dan Willemsen2016-02-081-11/+57
| | | | | Bug: 26957718 Change-Id: I5cfa2f44c27eac0805d21865c45546ed3c2c2103
* Toolchain modules use GCCDan Willemsen2016-01-131-0/+5
| | | | | | Don't use clang cflags if the device uses clang by default. Change-Id: Ice8474ae1f5e6f37fc8b47b1679d7fbdb9249e5a
* Apply ToolchainLdflags to clang buildsDan Willemsen2016-01-131-1/+1
| | | | | | Otherwise we're missing -m32 and -m64 in x86/x86_64 builds. Change-Id: If63cc6ce12795921584437e4cee4530c0dfb634f
* Add Clang Asflags for mipsDan Willemsen2016-01-133-0/+10
| | | | | | Like make, it needs -fPIC to be added to compile successfully. Change-Id: I1d6f1388c42a84f331bbce1ecd669669441d986e
* Remove libgcov for now to fix X86 devicesDan Willemsen2016-01-131-1/+1
| | | | | | | | | We should be using libprofile_rt for clang builds, but we only need to add either one if code coverage is enabled. This will be added again when we get more complete support. Bug: 26525326 Change-Id: Ic3da07c896be266bb35747a79c184e3d5bb8df70
* Change clang extra flags behaviorDan Willemsen2016-01-132-13/+11
| | | | | | | | Move the clang extra flags into the *ClangGlobal*flags variables, instead of adding them to every clang-based module. This means that they're only applied when !no_default_compiler_flags, like make. Change-Id: I43b1378d1d932d9aecfd8724a492d0d7716f7631
* Align flags with makeDan Willemsen2016-01-129-5/+10
| | | | | | This pulls a number of cflag changes from make since our last sync. Change-Id: I8c77fc215ed7677b8ac15a6d39143b519068dd55
* Allow libnativehelper to be missingDan Willemsen2016-01-071-1/+5
| | | | | | | Some branches may not include libnativehelper, or anything that depends on jni.h Change-Id: Id8bb9c101aecfacc5d62048818ea0c1c88b7d77c
* Allow building non-gtest tests with cc_testDan Willemsen2016-01-051-28/+49
| | | | | | | | | | That way we get the other special cc_test features (test_per_src, multilib-both default, nativetest install path). Restrict test_per_src to CCTest instead of allowing all CCBinaries to use it. Change-Id: I767540841fe5d1f9755883ee7c3d1f24004f9631
* Use xcrun and xcode-select to auto-configure mac sdkDan Willemsen2015-12-222-7/+51
| | | | | | | This roughly matches what make uses, but with less string parsing. Also use a full path to "ar", so that we can depend on it. Change-Id: I5e9d4c06b6cbbbfbf93e563dace128943db21b02
* Refactor install pathsDan Willemsen2015-12-211-4/+20
| | | | | | | | Explicitly allow installation into the data partition instead of using "../data" for tests. At the same time, pipe through the information required for vendor modules. Change-Id: I6baf9d828c285e1080e43074beef8aebdbb38875
* Make global C include paths optionalDan Willemsen2015-12-181-1/+1
| | | | | | | | Only add them to the global C include paths if they exist. And make sure to set up proper dependencies so that we notice when they are added or removed. Change-Id: Ia9df14f6ae6869927ad3d3a15fb5a8081f616a81
* Delay dependency errors to ninja time for unbundled buildsColin Cross2015-12-181-1/+1
| | | | | | | | | Unbundled builds may use a subset of the tree, which can bring in unused modules but not their dependencies. Delay handling of dependency errors for unbundled builds to ninja time, which will prevent errors if only modules with satisified dependencies are built. Change-Id: Ib93bae93fcfa0b55df500a30d8e35231ffb0987c
* Add brillo cflagsColin Cross2015-12-151-0/+4
| | | | | | | Add __BRILLO__ to global cflags when building for a brillo product. Bug: 26165350 Change-Id: I0100a8821b763075d1873d0d48fd5bd217afb580
* Enforce linker version-scripts are validDan Willemsen2015-12-117-0/+7
| | | | | | See build/ commit da9c00da5f7b Change-Id: I65878931ab61124ae75e2c738cc733adfb107afc
* Use `Path` instead of string for file pathsDan Willemsen2015-12-0914-257/+243
| | | | | | | | | | | | This centralizes verification and common operations, like converting the path to a source file to the path for a built object. It also embeds the configuration knowledge into the path, so that we can remove "${SrcDir}/path" from the ninja file. When SrcDir is '.', that leads to paths like './path' instead of just 'path' like make is doing, causing differences in compiled binaries. Change-Id: Ib4e8910a6e867ce1b7b420d927c04f1142a7589e
* Expose real GccVersionDan Willemsen2015-12-0710-22/+60
| | | | | | | | | | | | In order to validate that the NDK STL paths exists, we need to know the full path, including the Gcc version during the go execution. So instead of returning a ninja variable reference, just return the contents of the variable. This also fixes a few invalid uses of armGccVersion to the proper variable. Change-Id: I54398ba4aa4000235b7d537a2c4efe3ecbbeec8b
* Add Darwin-specific linker file flagsDan Willemsen2015-12-041-4/+40
| | | | | | | | | | | | | | Darwin's ld does not support --version-script, but it does support -unexported_symbols_list, -force_symbols_not_weak_list, and -force_symbols_weak_list that all take files as arguments. Instead of expecting these to be added to the ldflags manually, add properties for them so that the dependencies are handled appropriately. Also sanity checks the darwin vs non-darwin usages early, so that the error message is faster and more obvious. Change-Id: I42526cc4367b6ea9adfdbb58753e12824e8c321c
* Hybrid soong/mk build using prebuiltsDan Willemsen2015-12-012-2/+88
| | | | Change-Id: I96daa69af27bd19c8bfbe327a1318f51c738fc03
* Add -pie to device executable buildsColin Cross2015-12-011-0/+1
| | | | Change-Id: I8faf5a245f61fc412ba617ac762831d9fcdb8e73
* Change soong parameter name disabled -> enabledDan Willemsen2015-11-301-1/+1
| | | | | | This looks cleaner when we need to enable windows builds for modules. Change-Id: I61553e2124e08002b0bd9e35c1406c905718f2f7
* Support cross-compiling Windows binaries on LinuxDan Willemsen2015-11-3012-64/+280
| | | | | | | | This defines another mutator between HostOrDevice and Arch that will expand host modules into a module for each host type (Darwin/Linux/Windows) that is currently being built. Change-Id: I4c8ac6b616c229f6bd45ad8a35902652fb6a4fff
* Add mips64Colin Cross2015-11-241-0/+199
| | | | Change-Id: I2b4adbc1a1568b66515243005beda2c56a4a0519
* Add mipsColin Cross2015-11-241-0/+231
| | | | Change-Id: Icb05292877a60939542ce09d9774e4b9d1353502
* Add x86_64Colin Cross2015-11-241-0/+260
| | | | Change-Id: Ib0f31d147546ae187697867c6a0b937266bb9b39
* Add x86Colin Cross2015-11-243-0/+290
| | | | Change-Id: I28e78cd49b184e0aa50c1c562b6bf719300e0832
* pass ldflags to partial ld rulesColin Cross2015-11-241-3/+9
| | | | | | | | x86 crt partial ld steps need to pass -m32 through ldflags. Use gcc to run partial ld instead of going directly to ld. Allows reusing ToolchainLdflags, which have linker arguments prefixed with "-Wl,". Change-Id: I1e01ca5831061a11c9f550ab198d8e5b8dccf8bd
* Add toolchain cflags that are always usedColin Cross2015-11-243-9/+44
| | | | | | | | | | | | Some cflags are part of the toolchain selection and should not be removed by no_default_compiler_flags = true, for example -m32 for x86 compiles. Removing all the cflags results in hacks such as in crt.mk where the bare minimum cflags are reinserted. Add new toolchain interface functions ToolchainCflags, ToolchainLdflags and ToolchainClangCflags that will always be used. Change-Id: I0ba02d7611e2afb9ad913319740e00c1bb2d654c
* Switch to clang 3.8Dan Willemsen2015-11-241-1/+1
| | | | Change-Id: I8997bc4d765a18c789f2926da26610178a57be74