Commit graph

35074 commits

Author SHA1 Message Date
Colin Cross
6371b387b7 Add x86_64
Change-Id: Ib0f31d147546ae187697867c6a0b937266bb9b39
2015-11-24 21:34:36 +00:00
Colin Cross
b0cba6a00f Add x86
Change-Id: I28e78cd49b184e0aa50c1c562b6bf719300e0832
2015-11-24 21:34:26 +00:00
Colin Cross
41280a4225 pass ldflags to partial ld rules
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
2015-11-24 21:33:29 +00:00
Colin Cross
c4bde76832 Add toolchain cflags that are always used
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
2015-11-24 21:33:15 +00:00
Dan Willemsen
b30a8118f5 Switch to clang 3.8
Change-Id: I8997bc4d765a18c789f2926da26610178a57be74
2015-11-24 21:11:15 +00:00
Dan Willemsen
6203ac009c Actually add version-script to ldflags
Change-Id: I6c3fff2fd3b7273f4c6c1d1df92ffeb8574b5158
2015-11-24 12:58:57 -08:00
Colin Cross
85a8897454 move arch variant structs down a level
Use blueprint's new anonymous embedded struct feature to move the arch
variant properties down a level, replacing arch.cortex_a9.srcs with
arch.arm.cortex_a9.srcs, while still supporting top-level properties
like arch.arm.srcs.

Change-Id: I14820b75b31586ef1e16a4812dcb1f5fdf1ff941
2015-11-23 16:33:37 -08:00
Colin Cross
c5c24ade63 Add arch features
Allow architecture toolchains to register "features" supported by the
current variant, and then apply properties from the selected features.
Equivalent to the ARCH_*_HAS_* variables in the combo makefiles.

Change-Id: Ib6823be1c1a52da677d081db9f24336a072eaf39
2015-11-23 14:55:26 -08:00
Colin Cross
eeabb89426 make arch and variant parsing more robust
Post-process the arch and cpu variants to treat the arch name or
"generic" as an empty variant.  Filter out extra empty abis.  Ignore
empty arches.  Print a useful error message when appending properties
fails to find the target field, when an unknown architecture is used, or
when a toolchain has not been implemented for the selected
architecture.

Change-Id: I671d4cd04975f4f29aefc4267b3a624868ce6a75
2015-11-23 14:18:26 -08:00
Colin Cross
6ba99aa281 Update build.ninja.in for bootstrap changes
Change-Id: I5c2c210c884fe4d4b3b23ccba6f2239ac082cd2c
2015-11-23 14:18:26 -08:00
Colin Cross
b9ec7b43ca Delete androidbp
androidbp is gone, replaced with combining kati ninja output for
makefiles with blueprint ninja output for soong.

Change-Id: I00b9e28877abf2ceb2223d3ccf0637bc1b7571bb
2015-11-19 15:42:32 -08:00
Colin Cross
e356ecba34 Merge "Re-export exported includes from whole_static_libs" 2015-11-19 23:23:20 +00:00
Dan Willemsen
c94a768a2a Use Rule-local implicit dependencies
Depends on https://github.com/google/blueprint/pull/78

This uses the new CommandDeps field to move implicit dependencies
embedded in the Command string next to the definition, instead of having
to specify them in every BuildParam struct. This should make it easier
to verify dependencies.

Change-Id: I2711b160920e22fa962a436e1f7041272166f50f
2015-11-17 19:05:07 -08:00
Dan Willemsen
322a0a6b59 Fix and optimize relPwd in cc
We cannot use the PWD trick for any compile on Darwin, since /proc
doesn't exist. So instead of checking for darwin host modules, just
check runtime.GOOS.

And since this isn't a per-module decision, don't pass it along as a
variable to every build command, but make it a global variable.

Change-Id: Iea8609f49a9d316c58aed527f62d1986c970eaac
2015-11-17 18:09:57 -08:00
Colin Cross
a48f71fcbd Re-export exported includes from whole_static_libs
whole_static_libs is used to reexport all the symbols from a static
library when encapsulating it into another static library or shared
library, so reexport the headers as well.

Removes the need for libcxx to explicitly export the headers from
libcxxabi.

Change-Id: I283e043f2d2e819e2fdfa43b3f0f7a4537ba79ff
2015-11-16 18:06:32 -08:00
Colin Cross
5602b5888e Add armv8-a arch variant
Change-Id: I7f6655f52068568e699fcd0f2a16202254cd3786
2015-11-16 18:06:32 -08:00
Dan Willemsen
53aa1f62e4 Switch Disabled to a *bool for proper arch overrides
Change-Id: I0b26d9ae2443825479713f49c5eb704597522ec8
2015-11-09 14:05:27 -08:00
Colin Cross
cfad119eaf Add support for defaults modules
Add a cc_defaults module, which will prepend any matching properties to
modules that reference it with a "defaults" property.

Change-Id: I5908dd98d204f71b29ad95a4ab85403aa1621ca2
2015-11-03 15:46:08 -08:00
Colin Cross
6362e27848 Remove EarlyMutators and DynamicDependencies
EarlyMutators are identical to BottomUpMutators, except they run before
DynamicDependencies.  DynamicDependencies can be replaced with a
BottomUpMutator.  Replace both EarlyMutators and DynamicDependencies
with BottomUpMutators, which allows setting the order between all
mutators through registration order.

Change-Id: Id1305d798d3d2da592061c89d7c10a71780b71a3
2015-11-03 15:46:08 -08:00
Colin Cross
06a931bdb6 Replace extendProperties with pathtools.AppendProperties
Blueprint has a generic AppendProperties/AppendMatchingProperties now,
use it, and replace all bool properties that might be modified by a
mutator with *bool, which provides the correct replace-if-set semantics
for append.

Also remove uses of ContainsProperty except when explicitly checking if
a property was set in a blueprints file.

Change-Id: If523af61d6b4630e79504d7fc2840f36e98571cc
2015-11-03 15:46:08 -08:00
Colin Cross
7449857325 Update build.ninja.in for blueprint changes
Change-Id: I54da2f7802dcb06c6c40ca496c9efbb1d749361f
2015-11-03 14:49:06 -08:00
Dan Willemsen
6d11dd87c0 cc: Filter out unknown clang cflags from InstructionSetFlags
-funswitch-loops is in the arm instruction set flags, but unsupported by
clang. Make removes clang unknown cflags from the instruction set flags.
This was producing a warning, causing -Werror to fail on libm.

Change-Id: Ibc69c9af04a738aa8adeb5549900e2b53ab754f0
2015-11-03 14:30:12 -08:00
Colin Cross
6d27f3428e Fix gofmt
Change-Id: Idce816555f5d785a401f876f899af29b98c9c064
2015-10-28 17:23:16 -07:00
Dan Willemsen
e65404514c Updates from make
Contains equivalent changes for:

  561b4c1 Set mcpu targets based on cpu variant.
  6a66a88 Stop encoding absolute paths in symbols
  63e3b02 Enable color output from gcc and clang
  eb3e3fa Use exported includes for libc++.
  3a0a891 Link libgtest_main before libgtest

Change-Id: I45a06c02e9af1d40f0c52f1e6a20d6cd382a27fb
2015-10-20 16:44:55 -07:00
Dan Willemsen
dd0e2c338f Add DeviceUsesClang to change clang default
This is equivalent to USE_CLANG_PLATFORM_BUILD in the current build
system.

Change-Id: Ifaca0f2639871dac834ef603cfade695191cff11
2015-10-20 14:29:35 -07:00
Dan Willemsen
60c3dfb19a Add cortex_a53_64 and cortex_a53_a57
Renames cortex_a53 to cortex_a53_64, since we need to set options for
both. Also adds the cortex_a53_a57 big/little configuration.

Change-Id: Ia0e8104867f9aed7cbf5be8be1ead6ddc30c42c4
2015-10-16 17:29:12 -07:00
Dan Willemsen
96dc9f3f4a Fix X86_SSE3 -> X86_SSSE3
Change-Id: Ic89e13560e88920b133fab349e7c035b8fbea99f
2015-10-16 16:31:15 -07:00
Dan Willemsen
fa4d33f452 am 83285cec: Merge "Add ProductVariables.DeviceName, set defaults to flounder"
* commit '83285cec5f854c3e0fc91b51a39e1a69a058093f':
  Add ProductVariables.DeviceName, set defaults to flounder
2015-09-24 20:05:16 +00:00
Dan Willemsen
0417f1db7e am 1e898b9e: cc: Use local_include_dirs before include_dirs
* commit '1e898b9e04d85de7274c0cad3e8752b16196c100':
  cc: Use local_include_dirs before include_dirs
2015-09-24 20:05:14 +00:00
Dan Willemsen
83285cec5f Merge "Add ProductVariables.DeviceName, set defaults to flounder" 2015-09-24 20:00:59 +00:00
Dan Willemsen
1d31ec3667 Add ProductVariables.DeviceName, set defaults to flounder
Using flounder defaults to compare against make.

Change-Id: I88fb0809e84b78ef005b76f255017a4d4a35fd13
2015-09-23 15:31:39 -07:00
Dan Willemsen
1e898b9e04 cc: Use local_include_dirs before include_dirs
Prefer local headers over remote headers

Change-Id: Ic50104c5f2cfdd96cd749d35c52cd13706ac6367
2015-09-23 15:31:08 -07:00
Dan Willemsen
c01250ef5b am e9862da7: Update build.ninja.in for blueprint update
* commit 'e9862da7dd8d9911d26472248294069ba4f3e515':
  Update build.ninja.in for blueprint update
2015-09-19 19:52:40 +00:00
Dan Willemsen
e9862da7dd Update build.ninja.in for blueprint update
Change-Id: I71df8cd5f628855072f1a07e2be150d3e022344a
2015-09-18 12:48:44 -07:00
Colin Cross
27a4c1f256 am 2738597a: Fix product variables with no soong.variables
* commit '2738597af04d3795434dea7637528d5a63e4aff3':
  Fix product variables with no soong.variables
2015-09-18 19:39:22 +00:00
Colin Cross
2738597af0 Fix product variables with no soong.variables
If soong.variables didn't exist, loadFromConfigFile would write default
values to soong.variables, but return with the product variables set to
the zero values.  Replace jsonConfigurable.DefaultConfig() with
SetDefaultConfig() that modifies the current object, and call it before
writing the values.

Change-Id: I7b7404c7a51975dc4493e25c775b3cf56ef335e3
2015-09-18 10:59:41 -07:00
Dan Willemsen
26ca1fdca1 am 33c4578b: Merge "Use SRCDIR as a working directory"
* commit '33c4578b5f2fe9a7ba058d704c1f47690783ee63':
  Use SRCDIR as a working directory
2015-09-18 06:54:19 +00:00
Dan Willemsen
33c4578b5f Merge "Use SRCDIR as a working directory" 2015-09-18 06:48:57 +00:00
Dan Willemsen
87b17d1ff4 Use SRCDIR as a working directory
The existing behavior of using the build directory as the working
directory is useful if you want to move/copy the output directory around
and SRCDIR still refers the the source. But, it's more useful to have
the source directory be the working directory. Tools like cpp(__FILE__)
and other debug prints embed relative paths from the working directory.
We also have tools that expect the working directory to be $TOP.

Change-Id: Ia0f1d3c6b7df72d61cf5628efa2baa98bd19775b
2015-09-17 23:42:25 -07:00
Colin Cross
76c62b912d am 05d6f67f: Merge "Set host and device arches from product variables"
* commit '05d6f67ff75c319e4abe2d70984872f4b8407ac1':
  Set host and device arches from product variables
2015-09-18 01:02:28 +00:00
Colin Cross
05d6f67ff7 Merge "Set host and device arches from product variables" 2015-09-18 00:55:59 +00:00
Colin Cross
ffe6a381e2 am c3ba6cb9: Merge "Make Test_per_src a property on all binaries"
* commit 'c3ba6cb9707730e0fc553fa86b9fe6b6c9bbb4b9':
  Make Test_per_src a property on all binaries
2015-09-17 22:44:56 +00:00
Colin Cross
c3ba6cb970 Merge "Make Test_per_src a property on all binaries" 2015-09-17 22:34:04 +00:00
Colin Cross
4225f65920 Set host and device arches from product variables
Read the host and device arches from soong.variables.

Bug: 23567214
Change-Id: Ie44db4dcf431a4c7dddcdc26117d4daa734c1f67
2015-09-17 15:21:42 -07:00
Colin Cross
6002e056fd Make Test_per_src a property on all binaries
Change-Id: I36b84807cac3d8fd7ef50c8ffb8e2a85ddc10509
2015-09-17 15:21:42 -07:00
Dan Willemsen
c6d5fa58c4 am 550eb33a: Update build.ninja.in for go 1.5
* commit '550eb33aa5dae1616118b99480eb216b0f133e94':
  Update build.ninja.in for go 1.5
2015-09-17 21:39:50 +00:00
Dan Willemsen
550eb33aa5 Update build.ninja.in for go 1.5
Change-Id: I7a5b3cba2335fbc61b308ad4acc5148b4bd0a97f
2015-09-17 14:16:32 -07:00
Dan Willemsen
9c73419dc0 am 47cf66b8: Add platform_sdk_version product variable
* commit '47cf66b8d1b9e479ab87b54403480cb39e3acae8':
  Add platform_sdk_version product variable
2015-09-17 00:49:31 +00:00
Dan Willemsen
47cf66b8d1 Add platform_sdk_version product variable
For libc to use

Change-Id: I5048509e27ea4e4dc7773e7bd33e7f7b4deca608
2015-09-16 16:48:54 -07:00
Dan Willemsen
0a62ffdfe1 am cde6dce0: Merge "Allow \'sanitize\' to be arch-specific."
* commit 'cde6dce0268251e015b79efd9e20d6395298b391':
  Allow 'sanitize' to be arch-specific.
2015-09-16 23:08:31 +00:00