There was infrastructure to export ninja variables to bazel. Now that
the bazel migration is cancelled, we don't need it anymore.
Bug: 315353489
Test: m nothing
Change-Id: I298cc2ac7ebd004557be3b30d75f7357cab0b7a0
We fixed the clang driver to "do the right thing" based on target api level years ago, but these manual workarounds predate that (or were copy & pasted from places that predated that). We don't need them any more.
See https://github.com/android/ndk/issues/2005 for more detail.
Change-Id: I995741b8606e389e8de8272f1cc532624516245a
For chromebooks, we need a new build variant whose target arch is
goldmont, but without SHA and XSAVES support (b/314243939#comment21)
Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-sha-xsaves
Change-Id: If73660b515b443d5c138ca367fa3d1c6f18485b5
Its target arch is goldmont, but without xsaves support.
This ensures efficient execution on a broad range of Intel/AMD CPUs used
in Chromebooks, including those lacking xsaves support.
(e.g. Kaby Lake, Gemini Lake, Alder Lake and AMD Zen series)
Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-xsaves
Change-Id: I9963cc3356394815f068fc998a9708bdb30c8266
Remove Toolchain.GccRoot, Toolchain.GccVersion, and Toolchain.GccTriple
that were only used by an unused function. This removes most of the
references to GCC, although there are still some left in the host
toolchains.
Test: No change to build.ninja for aosp_cf_x86_64_phone-userdebug or aosp_raven-userdebug
Change-Id: I72b8af1f9aa83e6e15c9e00ed1e817b6cc3a031a
Most of the variable export code for cc modules can be re-used for
exporting variables for java modules. Refactor this code into a more
composable structure for reuse.
Test: build/bazel/bp2build.sh
Test: manual comparison of
out/soong/soong_injection/cc_toolchain/constants.bzl
with previous output
Change-Id: Ie5a6fee08cc888b7dc69c3e324e5c3f8aa269a8f
Previously this would result in a Ninja variable lookup, instead, let's
error sooner in Soong.
Test: CI
Change-Id: Ib3e15dce84364e6f7a83b82cb5f0e8694ffc9d2a
Rename the ninja variables that have an extraneous Clang in the name,
since there are no longer any non-Clang variables.
Bug: 68947919
Test: no change to command lines used to build mmma bionic
Change-Id: I081d5e1d423a66d55faece6cb1d265cd5e504d5f
Remove cflags that are not handled by clang from the global defaults,
and remove calls to ClangFilterUnknownCflags.
Squash lists of clang-specific default flags into the main default
flags lists.
Rename Toolchain.Clang*flags to Toolchain.*flags.
Rename Go variables with Clang in the name that have no non-Clang
equivalent.
Remove unused ninja variables.
Bug: 68947919
Test: no change to build.ninja for aosp_cf_x86_64_phone-userdebug or aosp_crosshatch-userdebug
Change-Id: Id287945315d53e5eaef197adbbb4f1302f2e3680
Host bionic and each of the device bionic architectures will share some
new toolchain functionality in common, create a toolchainBionic and embed
it into the toolchains. Use it to implement Bionic() once and change
the default implementation from true to false.
Test: go test ./cc/...
Test: m checkbuild
Change-Id: Ia34b80d9691edc4ab1cbdbd005d1ffc950d0881c
They are now explicit in the Bionic blueprints, and brought in through
dependencies on libc (which in turn is usually implicit through the
default system_shared_libs value). Modules that may break are cc_object
which don't depend on system_shared_libs, and those that explicitly set
system_shared_libs:[] but still assumes libc headers. In either case
the fix should be to add header_libs:["libc_headers"].
Test: Build and boot
Test: m checkbuild (on aosp_taimen and aosp_x86_64)
Bug: 153590472
Change-Id: I3217d8f36e49a987f5377866c8647f9dcccc37ce
Library components can enable the flags based on
performance impact
Test: run-test gtest
Change-Id: I41c4464cffd2b0e830d4ab1c5a25b378e2a25129
Signed-off-by: jaishank <jaishankar.rajendran@intel.com>
This patch adds new arch features avx2 and avx512 and
their supported archictectures for x86 and x86_64
Bug: 123376719
Test: m checkbuild
Change-Id: I3c079741815b39d7dbb4072e12ef7c9c2c15f5fe
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
This enables using arch-dependent property values in modules defined in
android/.
Bug: 122332178
Test: Soong tests + TreeHugger
Change-Id: I89869e395fabf0e69f505b77eab8a4221384124e
... and rename SanitizerRuntimeLibrary to LibclangRuntimeLibrary since
some of them are not sanitizers.
Bug: 29275768
Test: m
Change-Id: Id638adea42d22b02438fce26120aa155bea14d42
* USE_CLANG_LLD is unedefined in current builds.
* When USE_CLANG_LLD is defined to 'true' or '1',
use clang's lld instead of ld or ld.gold.
* When lld is enabled:
* ld-only flags are not passed to 'lld'.
* location_packer is disabled.
* Use new lld's --pack-dyn-relocs=android.
* When lld does not work:
* In Android.mk files use LOCAL_USE_CLANG_LLD := false.
* In Android.bp files use use_clang_lld: false.
* Only arm, arm64, x86, and x86_64_devices have LLD flags;
all other hosts and targets do not call lld yet.
Bug: 73768157
Test: make checkbuild and boot
Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
These flags were added for gcc, but are always stripped out when
compiling for clang. Since gcc is barely used, removed them.
Bug: 68855788
Bug: 68947919
Test: m checkbuild
Change-Id: Iae2bda9808dd9499848ce145ccdf71c4c490b80e
Move -fdata-sections and -fno-short-enums to global device flags.
-fdata-sections was not previously set on x86[_64], -fno-short-enums
was not previously set on mips[64].
Bug: 68855788
Test: m checkbuild
Change-Id: I68e64888d5414fc022366eb2b6c5cd92c28a5542
Move ldflags that are specified for all devices into
deviceGlobalLdflags, and add them to linker.go:
-Wl,-z,noexecstack
-Wl,-z,relro
-Wl,-z,now
-Wl,--build-id=md5
-Wl,--warn-shared-textrel
-Wl,--fatal-warnings
-Wl,--no-undefined-version
Bug: 68855788
Test: m checkbuild
Change-Id: I82561b4189287d7638006f9e298c5151f9930c5e
-Wl,--gc-sections is already added by library.go and binary.go for
anything that uses bionic.
Bug: 68855788
Test: m checkbuild
Change-Id: I229199045ef8595d69c07fcf1aa6bbdc0b753fe3
Move cflags that are set on all devices to deviceGlobalCflags:
-fno-canonical-system-headers
-ffunction-sections
-funwind-tables
-fstack-protector-strong
-Wa,--noexecstack
-D_FORTIFY_SOURCE=2
-Wstrict-aliasing=2
-Werror=format-security
Bug: 68855788
Test: m checkbuild
Change-Id: Iefec689fdd2749013d0cc003b3abec674a85fb74
Move all the flags that are used everywhere (or should be used
everywhere) into cc/config/global.go:
-no-canonical-prefixes
-fno-exceptions
-Wno-multichar
-O2
-g
-fno-strict-aliasing
Also remove flags that are already in noOverrideGlobalCflags:
-Werror=pointer-to-int-cast
-Werror=int-to-pointer-cast
x86 and x86_64 were specifying -fstrict-aliasing, but that was
being overriden later by -fno-strict-aliasing, so remove it.
ARM devices still override -fno-strict-aliasing to -fstrict-aliasing
when using ARM (vs. Thumb) instruction set.
Bug: 68855788
Test: m checkbuild
Change-Id: Ia2b5891bdefb60f974ad92b4b84a8548c2dcc7dc
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