Commit graph

19 commits

Author SHA1 Message Date
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
84f431fc34 Resolve GccTriple/ClangTriple early.
When these are Ninja variable they can't be used in android.Path since
they'll be rejected as invalid paths. We don't actually need them to be
a Ninja variable, so make them plain old strings instead.

Test: Still builds.
Change-Id: I04743cebd4b2f9be5685545f2ee941df180fce14
2016-07-27 11:12:07 -07:00
Colin Cross
f59b69ccaa Refactor bionic includes into a single place
Bionic includes are the same on all architectures, modulo
architecture-specific includes.  Use a single function to populate the
list, passing in bionic's and the kernel's names for the architecture.

Also get rid of the ${LibcRoot} variable, it is not providing any value
and makes grepping harder.

Change-Id: I39e7907d312f52dd1378a3937ab1bcba12c4e97f
2016-07-21 11:17:01 -07:00
Christopher Ferris
b68ea7a66c Add android/uapi kernel header.
Add the new android/uapi kernel header include directory.

Bug: 30072483
Change-Id: I3e1394b9abd744c7f76b0ac73bb07f614745a248
2016-07-18 18:36:31 -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
a2abfd6b30 Add the common directory back to kernel headers.
This is a port of build/ change 6a2f28514.

Change-Id: I9128abf61a56e282f335f540fcf064dd52706b2b
2016-05-18 16:51:24 -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
569b0fa2ae Fix X86 flags
Add extra clang cflags, and correct the clang triple for X86 device
builds.

Change-Id: I95abbd0f0f943ebdede905733785ee3659610058
2016-05-09 15:32:07 -07:00
Dan Willemsen
4ce4703182 Add -mpopcnt for X86_64 targets if they support popcnt
Change-Id: I09668a220f207d3d7510f058610846e4427d815e
2016-05-06 17:23:20 -07:00
Elliott Hughes
852442957b libm's headers have moved to live with their libc cousins.
(To reduce the need for this kind of thing in the various build systems.)

Change-Id: I75d11497bbf42695f804bcc9ea9ba3b3a12ac764
2016-04-04 12:58:03 -07:00
Dan Willemsen
b77bd796c2 sandybridge setup: no AES_NI, AVX, MOVBE
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
2016-02-29 15:26:26 -08:00
Dan Willemsen
7a0f848998 Align flags with make
This pulls a number of cflag changes from make since our last sync.

Change-Id: I8c77fc215ed7677b8ac15a6d39143b519068dd55
2016-01-12 23:30:13 -08:00
Dan Willemsen
c7e4597461 Enforce linker version-scripts are valid
See build/ commit da9c00da5f7b

Change-Id: I65878931ab61124ae75e2c738cc733adfb107afc
2015-12-11 21:21:28 +00:00
Dan Willemsen
34cc69e4bf Use Path instead of string for file paths
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
2015-12-09 14:29:12 -08:00
Dan Willemsen
34fc3b1e84 Expose real GccVersion
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
2015-12-07 14:02:37 -08:00
Dan Willemsen
490fd49557 Support cross-compiling Windows binaries on Linux
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
2015-11-30 15:28:31 -08:00
Colin Cross
6371b387b7 Add x86_64
Change-Id: Ib0f31d147546ae187697867c6a0b937266bb9b39
2015-11-24 21:34:36 +00:00