Commit graph

124 commits

Author SHA1 Message Date
Dan Willemsen
65905f8f62 Sort NDK_MIGRATED_LIBS in make_vars
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
2016-09-14 20:29:05 -07:00
Evgenii Stepanov
af36db1178 Add ubsan_standalone library name to the toolchain.
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
2016-08-15 17:05:04 -07:00
Colin Cross
b98c8b0595 Move toolchain and global variables into separate package
Move all of the configuration into a cc/config package

Change-Id: If56fc7242062ed1ce3cb297f78a1e0ef7537373c
2016-08-01 13:37:01 -07:00
Dan Albert
914449fca8 Generate NDK sysroots from the platform build.
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
2016-07-28 00:42:05 -07:00
Colin Cross
10c78c6b97 Rename exported make variables for system headers
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
2016-07-20 13:15:51 -07:00
Dan Willemsen
97704edd5d Support linking against NDK prebuilt libraries
When sdk_version is specified, we need to use the prebuilt ndk versions
of these libraries instead of the platform versions.

Change-Id: I4ff33a234a985041ebe11ab148d64d0f8df66fc4
2016-07-08 20:44:54 +00:00
Dan Willemsen
141d566f2b Remove support for libstdc++ on Android/Linux/Darwin
It's now only supported on Windows, where we don't have libc++ support
yet.

Change-Id: I64891b7558d3d2942588687017a0c2f695c18d5c
2016-06-15 13:47:51 -07:00
Colin Cross
a1ad8d1889 Simplify arch target handling
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
2016-06-02 19:09:32 -07:00
Colin Cross
b9db480385 Revert "Simplify arch target handling"
This reverts commit 6713fb26cbcadf525cd75e47d7d0cbc23d282b3e.

Change-Id: Ic473cea2563b0b37dc08b0bc5d3a0ac8c4b6afe6
2016-06-03 01:50:47 +00:00
Colin Cross
54c7112c43 Simplify arch target handling
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
2016-06-02 17:37:02 -07:00
Dan Willemsen
5efc706895 Export GLOBAL_[CLANG_]C[PP]FLAGS_NO_OVERRIDE to Make
Change-Id: I7f2f37f63720244eb1f3340804c00ae82d36e90b
2016-05-27 15:23:38 -07:00
Dan Willemsen
0bd588787b Export TARGET_TOOLCHAIN_ROOT
This is still used by brillo to find GCC for the kernel build.

Change-Id: I19238b1cc9c4220224048afebbdf6032015c3e89
2016-05-26 15:23:07 -07:00
Dan Willemsen
9598e1048a Stop sorting (C|CPP|LD)FLAGS when checking
Make isn't defining these anymore, so we don't need to sort them before
comparing.

Change-Id: Ia2f13f665309569ee8c564a8fb82639d174a83bb
2016-05-23 15:15:13 -07:00
Dan Willemsen
e8c5237775 Fix and check CLANG_CONFIG_UNKNOWN_CFLAGS
Change-Id: Id8d4ab5e7bf7c9ed161596c19ccdfe00aaa2f7c6
2016-05-20 00:19:14 -07:00
Dan Willemsen
558e517ae9 Check more Make variables
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
2016-05-20 00:19:14 -07:00
Dan Willemsen
d26a713dca Fix makevars (C|LD)FLAGS ordering
This better matches the order from cc/cc.go, so that any implicit
ordering behaves the same in Make and Soong.

Change-Id: I802d725f037a22c4b2f0ae28258af95efa37ce79
2016-05-18 23:00:57 -07:00
Colin Cross
635c3b0157 Rename common to android
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
2016-05-18 15:37:25 -07:00
Dan Willemsen
36cff8bb6f Fix Static_executable, implement BUILD_HOST_static from Make
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
2016-05-17 16:39:17 -07:00
Dan Willemsen
216a459ccc Export CONLYFLAGS and CPPFLAGS to Make
Change-Id: I061d531983b5bb544efb2f0ab5912cd2b461f58b
2016-05-17 01:00:50 -07:00
Dan Willemsen
06f453359a Export -D__BRILLO__ to make if necessary
Fixes Brillo builds

Change-Id: Ia3563b0c9e000d95ed18d05460f5c8c32e04e191
2016-05-16 19:32:33 -07:00
Dan Willemsen
b436fdee65 Turn on strict checking for C[PP]FLAGS make vars
Change-Id: I8448feb55b54515856798c1b3e8070d0e07e0b6c
2016-05-16 18:04:45 -07:00
Dan Willemsen
3772da13fd Don't use -B...gcc.. on Darwin
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
2016-05-16 18:04:01 -07:00
Dan Willemsen
73d21f25cb Add more make-exported variables
Change-Id: I6b7a30624923b8ca879d4ac7a3f1f11aec9b9b8a
2016-05-16 14:22:56 -07:00
Dan Willemsen
4b7d5deb84 Publish Soong configuration to Make variables
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
2016-05-12 13:36:55 -07:00