2016-07-29 21:48:20 +02:00
|
|
|
// Copyright 2016 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
package cc
|
|
|
|
|
|
|
|
import (
|
2019-02-25 03:05:47 +01:00
|
|
|
"path/filepath"
|
|
|
|
|
2018-10-12 09:24:23 +02:00
|
|
|
"github.com/google/blueprint"
|
2021-09-28 15:19:17 +02:00
|
|
|
"github.com/google/blueprint/proptools"
|
2018-10-12 09:24:23 +02:00
|
|
|
|
2016-07-29 21:48:20 +02:00
|
|
|
"android/soong/android"
|
2021-10-04 19:55:44 +02:00
|
|
|
"android/soong/bazel"
|
2016-07-29 21:48:20 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type BinaryLinkerProperties struct {
|
|
|
|
// compile executable with -static
|
|
|
|
Static_executable *bool `android:"arch_variant"`
|
|
|
|
|
|
|
|
// set the name of the output
|
2017-11-07 19:57:05 +01:00
|
|
|
Stem *string `android:"arch_variant"`
|
2016-07-29 21:48:20 +02:00
|
|
|
|
|
|
|
// append to the name of the output
|
2017-11-07 19:57:05 +01:00
|
|
|
Suffix *string `android:"arch_variant"`
|
2016-07-29 21:48:20 +02:00
|
|
|
|
|
|
|
// if set, add an extra objcopy --prefix-symbols= step
|
2017-11-07 19:57:05 +01:00
|
|
|
Prefix_symbols *string
|
2016-08-25 00:25:47 +02:00
|
|
|
|
|
|
|
// if set, install a symlink to the preferred architecture
|
2019-06-05 20:20:33 +02:00
|
|
|
Symlink_preferred_arch *bool `android:"arch_variant"`
|
2016-09-07 22:14:06 +02:00
|
|
|
|
2016-12-07 22:37:42 +01:00
|
|
|
// install symlinks to the binary. Symlink names will have the suffix and the binary
|
|
|
|
// extension (if any) appended
|
|
|
|
Symlinks []string `android:"arch_variant"`
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// override the dynamic linker
|
2016-09-07 22:14:06 +02:00
|
|
|
DynamicLinker string `blueprint:"mutated"`
|
2018-04-03 22:22:50 +02:00
|
|
|
|
|
|
|
// Names of modules to be overridden. Listed modules can only be other binaries
|
|
|
|
// (in Make or Soong).
|
|
|
|
// This does not completely prevent installation of the overridden binaries, but if both
|
|
|
|
// binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
|
|
|
|
// from PRODUCT_PACKAGES.
|
|
|
|
Overrides []string
|
2019-09-05 23:26:33 +02:00
|
|
|
|
|
|
|
// Inject boringssl hash into the shared library. This is only intended for use by external/boringssl.
|
|
|
|
Inject_bssl_hash *bool `android:"arch_variant"`
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2020-01-16 13:14:42 +01:00
|
|
|
RegisterBinaryBuildComponents(android.InitRegistrationContext)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterBinaryBuildComponents(ctx android.RegistrationContext) {
|
|
|
|
ctx.RegisterModuleType("cc_binary", BinaryFactory)
|
2021-10-04 19:55:44 +02:00
|
|
|
ctx.RegisterModuleType("cc_binary_host", BinaryHostFactory)
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2019-03-20 01:00:29 +01:00
|
|
|
// cc_binary produces a binary that is runnable on a device.
|
2018-12-20 10:18:08 +01:00
|
|
|
func BinaryFactory() android.Module {
|
2021-11-01 20:32:43 +01:00
|
|
|
module, _ := newBinary(android.HostAndDeviceSupported, true)
|
2016-07-29 21:48:20 +02:00
|
|
|
return module.Init()
|
|
|
|
}
|
|
|
|
|
2019-03-20 01:00:29 +01:00
|
|
|
// cc_binary_host produces a binary that is runnable on a host.
|
2021-10-04 19:55:44 +02:00
|
|
|
func BinaryHostFactory() android.Module {
|
2021-11-01 20:32:43 +01:00
|
|
|
module, _ := newBinary(android.HostSupported, true)
|
|
|
|
module.bazelable = true
|
2016-07-29 21:48:20 +02:00
|
|
|
return module.Init()
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Executables
|
|
|
|
//
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// binaryDecorator is a decorator containing information for C++ binary modules.
|
2016-07-30 02:28:03 +02:00
|
|
|
type binaryDecorator struct {
|
|
|
|
*baseLinker
|
2016-08-25 00:25:47 +02:00
|
|
|
*baseInstaller
|
2020-08-19 14:53:01 +02:00
|
|
|
stripper Stripper
|
2016-07-29 21:48:20 +02:00
|
|
|
|
|
|
|
Properties BinaryLinkerProperties
|
|
|
|
|
2016-09-29 01:18:03 +02:00
|
|
|
toolPath android.OptionalPath
|
2016-12-07 22:37:42 +01:00
|
|
|
|
2018-09-05 01:28:17 +02:00
|
|
|
// Location of the linked, unstripped binary
|
|
|
|
unstrippedOutputFile android.Path
|
|
|
|
|
2016-12-07 22:37:42 +01:00
|
|
|
// Names of symlinks to be installed for use in LOCAL_MODULE_SYMLINKS
|
|
|
|
symlinks []string
|
2017-02-10 01:16:31 +01:00
|
|
|
|
2020-11-12 21:14:36 +01:00
|
|
|
// If the module has symlink_preferred_arch set, the name of the symlink to the
|
|
|
|
// binary for the preferred arch.
|
|
|
|
preferredArchSymlink string
|
|
|
|
|
2017-02-10 01:16:31 +01:00
|
|
|
// Output archive of gcno coverage information
|
|
|
|
coverageOutputFile android.OptionalPath
|
2018-11-19 18:33:29 +01:00
|
|
|
|
2020-06-15 07:24:19 +02:00
|
|
|
// Location of the files that should be copied to dist dir when requested
|
|
|
|
distFiles android.TaggedDistFiles
|
2019-02-25 03:05:47 +01:00
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// Action command lines to run directly after the binary is installed. For example,
|
|
|
|
// may be used to symlink runtime dependencies (such as bionic) alongside installation.
|
2020-12-21 18:11:10 +01:00
|
|
|
postInstallCmds []string
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2016-07-30 02:28:03 +02:00
|
|
|
var _ linker = (*binaryDecorator)(nil)
|
2016-07-29 21:48:20 +02:00
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// linkerProps returns the list of individual properties objects relevant
|
|
|
|
// for this binary.
|
2016-07-30 02:28:03 +02:00
|
|
|
func (binary *binaryDecorator) linkerProps() []interface{} {
|
2016-08-01 22:20:05 +02:00
|
|
|
return append(binary.baseLinker.linkerProps(),
|
2016-07-29 21:48:20 +02:00
|
|
|
&binary.Properties,
|
|
|
|
&binary.stripper.StripProperties)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// getStemWithoutSuffix returns the main section of the name to use for the symlink of
|
|
|
|
// the main output file of this binary module. This may be derived from the module name
|
|
|
|
// or other property overrides.
|
|
|
|
// For the full symlink name, the `Suffix` property of a binary module must be appended.
|
2019-06-05 14:31:31 +02:00
|
|
|
func (binary *binaryDecorator) getStemWithoutSuffix(ctx BaseModuleContext) string {
|
2016-10-07 01:12:58 +02:00
|
|
|
stem := ctx.baseModuleName()
|
2017-11-07 19:57:05 +01:00
|
|
|
if String(binary.Properties.Stem) != "" {
|
|
|
|
stem = String(binary.Properties.Stem)
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2019-06-05 14:31:31 +02:00
|
|
|
return stem
|
|
|
|
}
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// getStem returns the full name to use for the symlink of the main output file of this binary
|
|
|
|
// module. This may be derived from the module name and/or other property overrides.
|
2019-06-05 14:31:31 +02:00
|
|
|
func (binary *binaryDecorator) getStem(ctx BaseModuleContext) string {
|
|
|
|
return binary.getStemWithoutSuffix(ctx) + String(binary.Properties.Suffix)
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// linkerDeps augments and returns the given `deps` to contain dependencies on
|
|
|
|
// modules common to most binaries, such as bionic libraries.
|
2016-12-14 02:06:13 +01:00
|
|
|
func (binary *binaryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
2016-08-01 22:20:05 +02:00
|
|
|
deps = binary.baseLinker.linkerDeps(ctx, deps)
|
2021-06-22 02:34:47 +02:00
|
|
|
if !Bool(binary.baseLinker.Properties.Nocrt) {
|
|
|
|
if binary.static() {
|
|
|
|
deps.CrtBegin = ctx.toolchain().CrtBeginStaticBinary()
|
|
|
|
deps.CrtEnd = ctx.toolchain().CrtEndStaticBinary()
|
|
|
|
} else {
|
|
|
|
deps.CrtBegin = ctx.toolchain().CrtBeginSharedBinary()
|
|
|
|
deps.CrtEnd = ctx.toolchain().CrtEndSharedBinary()
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
2021-06-22 02:34:47 +02:00
|
|
|
}
|
2016-07-29 21:48:20 +02:00
|
|
|
|
2021-08-18 22:52:09 +02:00
|
|
|
if binary.static() {
|
|
|
|
deps.StaticLibs = append(deps.StaticLibs, deps.SystemSharedLibs...)
|
|
|
|
}
|
|
|
|
|
2021-06-22 02:34:47 +02:00
|
|
|
if ctx.toolchain().Bionic() {
|
2016-07-30 02:28:03 +02:00
|
|
|
if binary.static() {
|
2017-01-27 02:44:26 +01:00
|
|
|
if ctx.selectedStl() == "libc++_static" {
|
Stop linking libdl.a into static bins
libdl.a has a no-op dlopen, which breaks static libraries that need a real
dlopen. Instead of automatically linking libdl.a into static executables,
make it optional.
Until recently, the libunwind_llvm.a unwinder, used on arm32, needed the
no-op dladdr, but it's now built using -D_LIBUNWIND_USE_DLADDR=0.
The HWASan run-time uses dlsym and dladdr, so add a libdl dependency for
HWASan-built static binaries. We could also remove the dependency from
libclang_rt.hwasan_static-*.a, but this is also easy to do.
Bug: http://b/141485154
Test: bionic unit tests, device boots, verify that static and dynamic
executables can throw/catch an exception
Test: verify that a static executable using dlopen doesn't link (unless it
adds an explicit dependency on libdl)
Change-Id: Ic52c3f336b671b4ed335e99c94a64dfe8614b618
2019-10-12 00:03:34 +02:00
|
|
|
deps.StaticLibs = append(deps.StaticLibs, "libm", "libc")
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
// static libraries libcompiler_rt, libc and libc_nomalloc need to be linked with
|
|
|
|
// --start-group/--end-group along with libgcc. If they are in deps.StaticLibs,
|
|
|
|
// move them to the beginning of deps.LateStaticLibs
|
|
|
|
var groupLibs []string
|
|
|
|
deps.StaticLibs, groupLibs = filterList(deps.StaticLibs,
|
|
|
|
[]string{"libc", "libc_nomalloc", "libcompiler_rt"})
|
|
|
|
deps.LateStaticLibs = append(groupLibs, deps.LateStaticLibs...)
|
|
|
|
}
|
2017-09-19 08:19:12 +02:00
|
|
|
|
|
|
|
if ctx.Os() == android.LinuxBionic && !binary.static() {
|
2018-10-12 09:24:23 +02:00
|
|
|
deps.DynamicLinker = "linker"
|
2017-09-19 08:19:12 +02:00
|
|
|
}
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2021-01-26 15:18:53 +01:00
|
|
|
if !binary.static() && inList("libc", deps.StaticLibs) && !ctx.BazelConversionMode() {
|
2016-07-29 21:48:20 +02:00
|
|
|
ctx.ModuleErrorf("statically linking libc to dynamic executable, please remove libc\n" +
|
|
|
|
"from static libs or set static_executable: true")
|
|
|
|
}
|
2018-02-06 23:40:13 +01:00
|
|
|
|
2016-07-29 21:48:20 +02:00
|
|
|
return deps
|
|
|
|
}
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// NewBinary builds and returns a new Module corresponding to a C++ binary.
|
|
|
|
// Individual module implementations which comprise a C++ binary should call this function,
|
|
|
|
// set some fields on the result, and then call the Init function.
|
2016-07-30 02:28:03 +02:00
|
|
|
func NewBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
|
2021-11-01 20:32:43 +01:00
|
|
|
return newBinary(hod, true)
|
|
|
|
}
|
|
|
|
|
|
|
|
func newBinary(hod android.HostOrDeviceSupported, bazelable bool) (*Module, *binaryDecorator) {
|
2016-07-29 21:48:20 +02:00
|
|
|
module := newModule(hod, android.MultilibFirst)
|
2016-07-30 02:28:03 +02:00
|
|
|
binary := &binaryDecorator{
|
2018-07-26 23:00:24 +02:00
|
|
|
baseLinker: NewBaseLinker(module.sanitize),
|
2016-08-25 00:25:47 +02:00
|
|
|
baseInstaller: NewBaseInstaller("bin", "", InstallInSystem),
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
2016-07-30 02:28:03 +02:00
|
|
|
module.compiler = NewBaseCompiler()
|
|
|
|
module.linker = binary
|
2016-08-25 00:25:47 +02:00
|
|
|
module.installer = binary
|
2021-11-01 20:32:43 +01:00
|
|
|
module.bazelable = bazelable
|
2020-01-16 12:47:25 +01:00
|
|
|
|
|
|
|
// Allow module to be added as member of an sdk/module_exports.
|
|
|
|
module.sdkMemberTypes = []android.SdkMemberType{
|
|
|
|
ccBinarySdkMemberType,
|
|
|
|
}
|
2016-07-30 02:28:03 +02:00
|
|
|
return module, binary
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// linkerInit initializes dynamic properties of the linker (such as runpath) based
|
|
|
|
// on properties of this binary.
|
2016-07-30 02:28:03 +02:00
|
|
|
func (binary *binaryDecorator) linkerInit(ctx BaseModuleContext) {
|
2016-08-01 22:20:05 +02:00
|
|
|
binary.baseLinker.linkerInit(ctx)
|
2016-07-29 21:48:20 +02:00
|
|
|
|
2021-08-18 22:53:58 +02:00
|
|
|
if !ctx.toolchain().Bionic() && !ctx.toolchain().Musl() {
|
2016-07-29 21:48:20 +02:00
|
|
|
if ctx.Os() == android.Linux {
|
2020-11-20 23:27:25 +01:00
|
|
|
// Unless explicitly specified otherwise, host static binaries are built with -static
|
|
|
|
// if HostStaticBinaries is true for the product configuration.
|
2018-03-12 23:30:26 +01:00
|
|
|
if binary.Properties.Static_executable == nil && ctx.Config().HostStaticBinaries() {
|
2017-11-07 19:57:05 +01:00
|
|
|
binary.Properties.Static_executable = BoolPtr(true)
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
2021-07-20 22:17:15 +02:00
|
|
|
} else {
|
2016-07-29 21:48:20 +02:00
|
|
|
// Static executables are not supported on Darwin or Windows
|
2016-07-30 02:28:03 +02:00
|
|
|
binary.Properties.Static_executable = nil
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-30 02:28:03 +02:00
|
|
|
func (binary *binaryDecorator) static() bool {
|
|
|
|
return Bool(binary.Properties.Static_executable)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (binary *binaryDecorator) staticBinary() bool {
|
|
|
|
return binary.static()
|
|
|
|
}
|
|
|
|
|
2020-06-01 14:53:49 +02:00
|
|
|
func (binary *binaryDecorator) binary() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// linkerFlags returns a Flags object containing linker flags that are defined
|
|
|
|
// by this binary, or that are implied by attributes of this binary. These flags are
|
|
|
|
// combined with the given flags.
|
2016-07-30 02:28:03 +02:00
|
|
|
func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
|
2016-08-01 22:20:05 +02:00
|
|
|
flags = binary.baseLinker.linkerFlags(ctx, flags)
|
2016-07-29 21:48:20 +02:00
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// Passing -pie to clang for Windows binaries causes a warning that -pie is unused.
|
2018-09-15 01:00:16 +02:00
|
|
|
if ctx.Host() && !ctx.Windows() && !binary.static() {
|
2017-11-29 09:27:14 +01:00
|
|
|
if !ctx.Config().IsEnvTrue("DISABLE_HOST_PIE") {
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Global.LdFlags = append(flags.Global.LdFlags, "-pie")
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// MinGW spits out warnings about -fPIC even for -fpie?!) being ignored because
|
|
|
|
// all code is position independent, and then those warnings get promoted to
|
|
|
|
// errors.
|
2017-04-04 21:59:48 +02:00
|
|
|
if !ctx.Windows() {
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Global.CFlags = append(flags.Global.CFlags, "-fPIE")
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2016-11-17 10:02:25 +01:00
|
|
|
if ctx.toolchain().Bionic() {
|
2016-07-30 02:28:03 +02:00
|
|
|
if binary.static() {
|
2016-07-29 21:48:20 +02:00
|
|
|
// Clang driver needs -static to create static executable.
|
|
|
|
// However, bionic/linker uses -shared to overwrite.
|
|
|
|
// Linker for x86 targets does not allow coexistance of -static and -shared,
|
|
|
|
// so we add -static only if -shared is not used.
|
2019-11-04 18:37:55 +01:00
|
|
|
if !inList("-shared", flags.Local.LdFlags) {
|
|
|
|
flags.Global.LdFlags = append(flags.Global.LdFlags, "-static")
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Global.LdFlags = append(flags.Global.LdFlags,
|
2016-07-29 21:48:20 +02:00
|
|
|
"-nostdlib",
|
|
|
|
"-Bstatic",
|
|
|
|
"-Wl,--gc-sections",
|
|
|
|
)
|
2020-11-20 23:27:25 +01:00
|
|
|
} else { // not static
|
2016-07-29 21:48:20 +02:00
|
|
|
if flags.DynamicLinker == "" {
|
2016-09-07 22:14:06 +02:00
|
|
|
if binary.Properties.DynamicLinker != "" {
|
|
|
|
flags.DynamicLinker = binary.Properties.DynamicLinker
|
|
|
|
} else {
|
2016-06-14 02:19:03 +02:00
|
|
|
switch ctx.Os() {
|
|
|
|
case android.Android:
|
2020-10-22 00:17:56 +02:00
|
|
|
if ctx.bootstrap() && !ctx.inRecovery() && !ctx.inRamdisk() && !ctx.inVendorRamdisk() {
|
2019-01-16 14:53:13 +01:00
|
|
|
flags.DynamicLinker = "/system/bin/bootstrap/linker"
|
|
|
|
} else {
|
|
|
|
flags.DynamicLinker = "/system/bin/linker"
|
|
|
|
}
|
2018-10-12 09:24:23 +02:00
|
|
|
if flags.Toolchain.Is64Bit() {
|
|
|
|
flags.DynamicLinker += "64"
|
|
|
|
}
|
2016-06-14 02:19:03 +02:00
|
|
|
case android.LinuxBionic:
|
2017-09-19 08:19:12 +02:00
|
|
|
flags.DynamicLinker = ""
|
2016-06-14 02:19:03 +02:00
|
|
|
default:
|
|
|
|
ctx.ModuleErrorf("unknown dynamic linker")
|
|
|
|
}
|
2018-10-12 09:24:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ctx.Os() == android.LinuxBionic {
|
|
|
|
// Use the dlwrap entry point, but keep _start around so
|
|
|
|
// that it can be used by host_bionic_inject
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Global.LdFlags = append(flags.Global.LdFlags,
|
2018-10-12 09:24:23 +02:00
|
|
|
"-Wl,--entry=__dlwrap__start",
|
|
|
|
"-Wl,--undefined=_start",
|
|
|
|
)
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Global.LdFlags = append(flags.Global.LdFlags,
|
2016-07-29 21:48:20 +02:00
|
|
|
"-pie",
|
|
|
|
"-nostdlib",
|
|
|
|
"-Bdynamic",
|
|
|
|
"-Wl,--gc-sections",
|
|
|
|
"-Wl,-z,nocopyreloc",
|
|
|
|
)
|
|
|
|
}
|
2020-11-20 23:27:25 +01:00
|
|
|
} else { // not bionic
|
2016-07-30 02:28:03 +02:00
|
|
|
if binary.static() {
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Global.LdFlags = append(flags.Global.LdFlags, "-static")
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
if ctx.Darwin() {
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Global.LdFlags = append(flags.Global.LdFlags, "-Wl,-headerpad_max_install_names")
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return flags
|
|
|
|
}
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// link registers actions to link this binary, and sets various fields
|
|
|
|
// on this binary to reflect information that should be exported up the build
|
|
|
|
// tree (for example, exported flags and include paths).
|
2016-07-30 02:28:03 +02:00
|
|
|
func (binary *binaryDecorator) link(ctx ModuleContext,
|
2016-09-27 02:33:01 +02:00
|
|
|
flags Flags, deps PathDeps, objs Objects) android.Path {
|
2016-07-29 21:48:20 +02:00
|
|
|
|
|
|
|
fileName := binary.getStem(ctx) + flags.Toolchain.ExecutableSuffix()
|
|
|
|
outputFile := android.PathForModuleOut(ctx, fileName)
|
|
|
|
ret := outputFile
|
|
|
|
|
|
|
|
var linkerDeps android.Paths
|
|
|
|
|
|
|
|
if flags.DynamicLinker != "" {
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-dynamic-linker,"+flags.DynamicLinker)
|
2021-07-24 00:23:07 +02:00
|
|
|
} else if (ctx.toolchain().Bionic() || ctx.toolchain().Musl()) && !binary.static() {
|
2019-11-04 18:37:55 +01:00
|
|
|
flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,--no-dynamic-linker")
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2021-10-20 05:24:49 +02:00
|
|
|
if ctx.Darwin() && deps.DarwinSecondArchOutput.Valid() {
|
|
|
|
fatOutputFile := outputFile
|
|
|
|
outputFile = android.PathForModuleOut(ctx, "pre-fat", fileName)
|
|
|
|
transformDarwinUniversalBinary(ctx, fatOutputFile, outputFile, deps.DarwinSecondArchOutput.Path())
|
|
|
|
}
|
|
|
|
|
2016-07-29 21:48:20 +02:00
|
|
|
builderFlags := flagsToBuilderFlags(flags)
|
2020-08-19 14:53:01 +02:00
|
|
|
stripFlags := flagsToStripFlags(flags)
|
|
|
|
if binary.stripper.NeedsStrip(ctx) {
|
2018-11-08 01:28:49 +01:00
|
|
|
if ctx.Darwin() {
|
2020-08-19 14:53:01 +02:00
|
|
|
stripFlags.StripUseGnuStrip = true
|
2018-11-08 01:28:49 +01:00
|
|
|
}
|
2016-07-29 21:48:20 +02:00
|
|
|
strippedOutputFile := outputFile
|
|
|
|
outputFile = android.PathForModuleOut(ctx, "unstripped", fileName)
|
2020-08-19 14:53:01 +02:00
|
|
|
binary.stripper.StripExecutableOrSharedLib(ctx, outputFile, strippedOutputFile, stripFlags)
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2018-09-05 01:28:17 +02:00
|
|
|
binary.unstrippedOutputFile = outputFile
|
|
|
|
|
2017-11-07 19:57:05 +01:00
|
|
|
if String(binary.Properties.Prefix_symbols) != "" {
|
2016-07-29 21:48:20 +02:00
|
|
|
afterPrefixSymbols := outputFile
|
|
|
|
outputFile = android.PathForModuleOut(ctx, "unprefixed", fileName)
|
2020-11-23 23:02:44 +01:00
|
|
|
transformBinaryPrefixSymbols(ctx, String(binary.Properties.Prefix_symbols), outputFile,
|
2020-08-19 14:53:01 +02:00
|
|
|
builderFlags, afterPrefixSymbols)
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
|
|
|
|
2019-09-05 23:26:33 +02:00
|
|
|
outputFile = maybeInjectBoringSSLHash(ctx, outputFile, binary.Properties.Inject_bssl_hash, fileName)
|
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// If use_version_lib is true, make an android::build::GetBuildNumber() function available.
|
2018-11-19 18:33:29 +01:00
|
|
|
if Bool(binary.baseLinker.Properties.Use_version_lib) {
|
|
|
|
if ctx.Host() {
|
|
|
|
versionedOutputFile := outputFile
|
|
|
|
outputFile = android.PathForModuleOut(ctx, "unversioned", fileName)
|
|
|
|
binary.injectVersionSymbol(ctx, outputFile, versionedOutputFile)
|
|
|
|
} else {
|
2020-11-20 23:27:25 +01:00
|
|
|
// When dist'ing a library or binary that has use_version_lib set, always
|
|
|
|
// distribute the stamped version, even for the device.
|
2018-11-19 18:33:29 +01:00
|
|
|
versionedOutputFile := android.PathForModuleOut(ctx, "versioned", fileName)
|
2020-06-15 07:24:19 +02:00
|
|
|
binary.distFiles = android.MakeDefaultDistFiles(versionedOutputFile)
|
2018-11-19 18:33:29 +01:00
|
|
|
|
2020-08-19 14:53:01 +02:00
|
|
|
if binary.stripper.NeedsStrip(ctx) {
|
2018-11-19 18:33:29 +01:00
|
|
|
out := android.PathForModuleOut(ctx, "versioned-stripped", fileName)
|
2020-06-15 07:24:19 +02:00
|
|
|
binary.distFiles = android.MakeDefaultDistFiles(out)
|
2020-08-19 14:53:01 +02:00
|
|
|
binary.stripper.StripExecutableOrSharedLib(ctx, versionedOutputFile, out, stripFlags)
|
2018-11-19 18:33:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
binary.injectVersionSymbol(ctx, outputFile, versionedOutputFile)
|
|
|
|
}
|
2018-02-15 23:12:26 +01:00
|
|
|
}
|
|
|
|
|
2021-10-12 01:46:56 +02:00
|
|
|
var validations android.Paths
|
2021-06-12 00:22:41 +02:00
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// Handle host bionic linker symbols.
|
2018-10-12 09:24:23 +02:00
|
|
|
if ctx.Os() == android.LinuxBionic && !binary.static() {
|
2021-06-12 00:22:41 +02:00
|
|
|
verifyFile := android.PathForModuleOut(ctx, "host_bionic_verify.stamp")
|
2018-10-12 09:24:23 +02:00
|
|
|
|
|
|
|
if !deps.DynamicLinker.Valid() {
|
|
|
|
panic("Non-static host bionic modules must have a dynamic linker")
|
|
|
|
}
|
|
|
|
|
2021-06-12 00:22:41 +02:00
|
|
|
binary.verifyHostBionicLinker(ctx, outputFile, deps.DynamicLinker.Path(), verifyFile)
|
|
|
|
validations = append(validations, verifyFile)
|
2018-10-12 09:24:23 +02:00
|
|
|
}
|
|
|
|
|
2018-12-18 20:08:25 +01:00
|
|
|
var sharedLibs android.Paths
|
|
|
|
// Ignore shared libs for static executables.
|
|
|
|
if !binary.static() {
|
2019-01-18 06:37:08 +01:00
|
|
|
sharedLibs = deps.EarlySharedLibs
|
|
|
|
sharedLibs = append(sharedLibs, deps.SharedLibs...)
|
2018-12-18 20:08:25 +01:00
|
|
|
sharedLibs = append(sharedLibs, deps.LateSharedLibs...)
|
2019-01-18 06:37:08 +01:00
|
|
|
linkerDeps = append(linkerDeps, deps.EarlySharedLibsDeps...)
|
2018-12-18 20:08:25 +01:00
|
|
|
linkerDeps = append(linkerDeps, deps.SharedLibsDeps...)
|
|
|
|
linkerDeps = append(linkerDeps, deps.LateSharedLibsDeps...)
|
2021-12-06 03:02:50 +01:00
|
|
|
linkerDeps = append(linkerDeps, ndkSharedLibDeps(ctx)...)
|
2018-12-18 20:08:25 +01:00
|
|
|
}
|
|
|
|
|
2022-01-09 04:56:09 +01:00
|
|
|
validations = append(validations, objs.tidyDepFiles...)
|
2017-09-01 08:38:27 +02:00
|
|
|
linkerDeps = append(linkerDeps, flags.LdFlagsDeps...)
|
2016-10-01 02:10:16 +02:00
|
|
|
|
2020-11-20 23:27:25 +01:00
|
|
|
// Register link action.
|
2020-11-23 23:02:44 +01:00
|
|
|
transformObjToDynamicBinary(ctx, objs.objFiles, sharedLibs, deps.StaticLibs,
|
2016-07-29 21:48:20 +02:00
|
|
|
deps.LateStaticLibs, deps.WholeStaticLibs, linkerDeps, deps.CrtBegin, deps.CrtEnd, true,
|
2021-06-12 00:22:41 +02:00
|
|
|
builderFlags, outputFile, nil, validations)
|
2016-07-29 21:48:20 +02:00
|
|
|
|
2017-02-10 01:16:31 +01:00
|
|
|
objs.coverageFiles = append(objs.coverageFiles, deps.StaticLibObjs.coverageFiles...)
|
|
|
|
objs.coverageFiles = append(objs.coverageFiles, deps.WholeStaticLibObjs.coverageFiles...)
|
2020-11-23 23:02:44 +01:00
|
|
|
binary.coverageOutputFile = transformCoverageFilesToZip(ctx, objs, binary.getStem(ctx))
|
2017-02-10 01:16:31 +01:00
|
|
|
|
2019-01-18 23:37:31 +01:00
|
|
|
// Need to determine symlinks early since some targets (ie APEX) need this
|
|
|
|
// information but will not call 'install'
|
2016-12-07 22:37:42 +01:00
|
|
|
for _, symlink := range binary.Properties.Symlinks {
|
|
|
|
binary.symlinks = append(binary.symlinks,
|
2017-11-07 19:57:05 +01:00
|
|
|
symlink+String(binary.Properties.Suffix)+ctx.toolchain().ExecutableSuffix())
|
2016-12-07 22:37:42 +01:00
|
|
|
}
|
|
|
|
|
2017-11-07 19:57:05 +01:00
|
|
|
if Bool(binary.Properties.Symlink_preferred_arch) {
|
2019-06-05 14:31:31 +02:00
|
|
|
if String(binary.Properties.Suffix) == "" {
|
|
|
|
ctx.PropertyErrorf("symlink_preferred_arch", "must also specify suffix")
|
2016-12-07 22:37:42 +01:00
|
|
|
}
|
|
|
|
if ctx.TargetPrimary() {
|
2020-11-20 23:27:25 +01:00
|
|
|
// Install a symlink to the preferred architecture
|
2020-11-12 21:14:36 +01:00
|
|
|
symlinkName := binary.getStemWithoutSuffix(ctx)
|
|
|
|
binary.symlinks = append(binary.symlinks, symlinkName)
|
|
|
|
binary.preferredArchSymlink = symlinkName
|
2016-12-07 22:37:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-18 23:37:31 +01:00
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2019-01-31 04:21:23 +01:00
|
|
|
func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path {
|
|
|
|
return binary.unstrippedOutputFile
|
|
|
|
}
|
|
|
|
|
2019-01-18 23:37:31 +01:00
|
|
|
func (binary *binaryDecorator) symlinkList() []string {
|
|
|
|
return binary.symlinks
|
|
|
|
}
|
|
|
|
|
2019-03-25 18:21:31 +01:00
|
|
|
func (binary *binaryDecorator) nativeCoverage() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
2019-08-09 07:44:36 +02:00
|
|
|
func (binary *binaryDecorator) coverageOutputFilePath() android.OptionalPath {
|
|
|
|
return binary.coverageOutputFile
|
|
|
|
}
|
|
|
|
|
2019-02-25 03:05:47 +01:00
|
|
|
// /system/bin/linker -> /apex/com.android.runtime/bin/linker
|
|
|
|
func (binary *binaryDecorator) installSymlinkToRuntimeApex(ctx ModuleContext, file android.Path) {
|
|
|
|
dir := binary.baseInstaller.installDir(ctx)
|
|
|
|
dirOnDevice := android.InstallPathToOnDevicePath(ctx, dir)
|
|
|
|
target := "/" + filepath.Join("apex", "com.android.runtime", dir.Base(), file.Base())
|
|
|
|
|
|
|
|
ctx.InstallAbsoluteSymlink(dir, file.Base(), target)
|
2020-12-21 18:11:10 +01:00
|
|
|
binary.postInstallCmds = append(binary.postInstallCmds, makeSymlinkCmd(dirOnDevice, file.Base(), target))
|
2019-02-25 03:05:47 +01:00
|
|
|
|
|
|
|
for _, symlink := range binary.symlinks {
|
|
|
|
ctx.InstallAbsoluteSymlink(dir, symlink, target)
|
2020-12-21 18:11:10 +01:00
|
|
|
binary.postInstallCmds = append(binary.postInstallCmds, makeSymlinkCmd(dirOnDevice, symlink, target))
|
2019-02-25 03:05:47 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-18 23:37:31 +01:00
|
|
|
func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
|
2019-02-25 03:05:47 +01:00
|
|
|
// Bionic binaries (e.g. linker) is installed to the bootstrap subdirectory.
|
|
|
|
// The original path becomes a symlink to the corresponding file in the
|
|
|
|
// runtime APEX.
|
2019-09-17 23:45:31 +02:00
|
|
|
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
|
2020-09-16 03:30:11 +02:00
|
|
|
if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !ctx.Host() && ctx.directlyInAnyApex() &&
|
2020-10-22 00:17:56 +02:00
|
|
|
!translatedArch && ctx.apexVariationName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() &&
|
|
|
|
!ctx.inVendorRamdisk() {
|
2020-09-16 03:30:11 +02:00
|
|
|
|
2019-04-24 23:41:12 +02:00
|
|
|
if ctx.Device() && isBionic(ctx.baseModuleName()) {
|
2019-03-15 17:10:08 +01:00
|
|
|
binary.installSymlinkToRuntimeApex(ctx, file)
|
|
|
|
}
|
2019-02-25 03:05:47 +01:00
|
|
|
binary.baseInstaller.subDir = "bootstrap"
|
|
|
|
}
|
2019-01-18 23:37:31 +01:00
|
|
|
binary.baseInstaller.install(ctx, file)
|
2020-11-12 21:14:36 +01:00
|
|
|
|
|
|
|
var preferredArchSymlinkPath android.OptionalPath
|
2016-12-07 22:37:42 +01:00
|
|
|
for _, symlink := range binary.symlinks {
|
2020-11-12 21:14:36 +01:00
|
|
|
installedSymlink := ctx.InstallSymlink(binary.baseInstaller.installDir(ctx), symlink,
|
|
|
|
binary.baseInstaller.path)
|
|
|
|
if symlink == binary.preferredArchSymlink {
|
|
|
|
// If this is the preferred arch symlink, save the installed path for use as the
|
|
|
|
// tool path.
|
|
|
|
preferredArchSymlinkPath = android.OptionalPathForPath(installedSymlink)
|
|
|
|
}
|
2016-12-07 22:37:42 +01:00
|
|
|
}
|
|
|
|
|
2016-09-29 01:18:03 +02:00
|
|
|
if ctx.Os().Class == android.Host {
|
2020-11-12 21:14:36 +01:00
|
|
|
// If the binary is multilib with a symlink to the preferred architecture, use the
|
|
|
|
// symlink instead of the binary because that's the more "canonical" name.
|
|
|
|
if preferredArchSymlinkPath.Valid() {
|
|
|
|
binary.toolPath = preferredArchSymlinkPath
|
|
|
|
} else {
|
|
|
|
binary.toolPath = android.OptionalPathForPath(binary.baseInstaller.path)
|
|
|
|
}
|
2016-09-29 01:18:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (binary *binaryDecorator) hostToolPath() android.OptionalPath {
|
|
|
|
return binary.toolPath
|
2016-07-29 21:48:20 +02:00
|
|
|
}
|
2018-10-12 09:24:23 +02:00
|
|
|
|
|
|
|
func init() {
|
2021-06-12 00:22:41 +02:00
|
|
|
pctx.HostBinToolVariable("verifyHostBionicCmd", "host_bionic_verify")
|
2018-10-12 09:24:23 +02:00
|
|
|
}
|
|
|
|
|
2021-06-12 00:22:41 +02:00
|
|
|
var verifyHostBionic = pctx.AndroidStaticRule("verifyHostBionic",
|
2018-10-12 09:24:23 +02:00
|
|
|
blueprint.RuleParams{
|
2021-06-12 00:22:41 +02:00
|
|
|
Command: "$verifyHostBionicCmd -i $in -l $linker && touch $out",
|
|
|
|
CommandDeps: []string{"$verifyHostBionicCmd"},
|
2018-10-12 09:24:23 +02:00
|
|
|
}, "linker")
|
|
|
|
|
2021-06-12 00:22:41 +02:00
|
|
|
func (binary *binaryDecorator) verifyHostBionicLinker(ctx ModuleContext, in, linker android.Path, out android.WritablePath) {
|
2018-10-12 09:24:23 +02:00
|
|
|
ctx.Build(pctx, android.BuildParams{
|
2021-06-12 00:22:41 +02:00
|
|
|
Rule: verifyHostBionic,
|
|
|
|
Description: "verify host bionic",
|
2018-10-12 09:24:23 +02:00
|
|
|
Input: in,
|
|
|
|
Implicit: linker,
|
|
|
|
Output: out,
|
|
|
|
Args: map[string]string{
|
|
|
|
"linker": linker.String(),
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
2021-10-04 19:55:44 +02:00
|
|
|
|
2021-11-01 20:32:43 +01:00
|
|
|
func binaryBp2build(ctx android.TopDownMutatorContext, m *Module, typ string) {
|
2021-10-19 19:56:10 +02:00
|
|
|
baseAttrs := bp2BuildParseBaseProps(ctx, m)
|
2021-09-28 15:19:17 +02:00
|
|
|
binaryLinkerAttrs := bp2buildBinaryLinkerProps(ctx, m)
|
|
|
|
|
|
|
|
if proptools.BoolDefault(binaryLinkerAttrs.Linkshared, true) {
|
|
|
|
baseAttrs.implementationDynamicDeps.Add(baseAttrs.protoDependency)
|
|
|
|
} else {
|
|
|
|
baseAttrs.implementationDeps.Add(baseAttrs.protoDependency)
|
|
|
|
}
|
2021-10-04 19:55:44 +02:00
|
|
|
|
|
|
|
attrs := &binaryAttributes{
|
2021-09-28 15:19:17 +02:00
|
|
|
binaryLinkerAttrs: binaryLinkerAttrs,
|
2021-10-04 19:55:44 +02:00
|
|
|
|
2021-10-19 19:56:10 +02:00
|
|
|
Srcs: baseAttrs.srcs,
|
|
|
|
Srcs_c: baseAttrs.cSrcs,
|
|
|
|
Srcs_as: baseAttrs.asSrcs,
|
2021-10-04 19:55:44 +02:00
|
|
|
|
2021-10-19 19:56:10 +02:00
|
|
|
Copts: baseAttrs.copts,
|
|
|
|
Cppflags: baseAttrs.cppFlags,
|
|
|
|
Conlyflags: baseAttrs.conlyFlags,
|
|
|
|
Asflags: baseAttrs.asFlags,
|
2021-10-04 19:55:44 +02:00
|
|
|
|
2021-10-19 19:56:10 +02:00
|
|
|
Deps: baseAttrs.implementationDeps,
|
|
|
|
Dynamic_deps: baseAttrs.implementationDynamicDeps,
|
|
|
|
Whole_archive_deps: baseAttrs.wholeArchiveDeps,
|
|
|
|
System_deps: baseAttrs.systemDynamicDeps,
|
2021-10-04 19:55:44 +02:00
|
|
|
|
2021-10-19 19:56:10 +02:00
|
|
|
Local_includes: baseAttrs.localIncludes,
|
|
|
|
Absolute_includes: baseAttrs.absoluteIncludes,
|
|
|
|
Linkopts: baseAttrs.linkopts,
|
|
|
|
Link_crt: baseAttrs.linkCrt,
|
|
|
|
Use_libcrt: baseAttrs.useLibcrt,
|
|
|
|
Rtti: baseAttrs.rtti,
|
|
|
|
Stl: baseAttrs.stl,
|
|
|
|
Cpp_std: baseAttrs.cppStd,
|
2021-10-04 19:55:44 +02:00
|
|
|
|
2021-10-19 19:56:10 +02:00
|
|
|
Additional_linker_inputs: baseAttrs.additionalLinkerInputs,
|
2021-10-04 19:55:44 +02:00
|
|
|
|
|
|
|
Strip: stripAttributes{
|
2021-10-19 19:56:10 +02:00
|
|
|
Keep_symbols: baseAttrs.stripKeepSymbols,
|
|
|
|
Keep_symbols_and_debug_frame: baseAttrs.stripKeepSymbolsAndDebugFrame,
|
|
|
|
Keep_symbols_list: baseAttrs.stripKeepSymbolsList,
|
|
|
|
All: baseAttrs.stripAll,
|
|
|
|
None: baseAttrs.stripNone,
|
2021-10-04 19:55:44 +02:00
|
|
|
},
|
|
|
|
|
2021-12-10 00:10:18 +01:00
|
|
|
Features: baseAttrs.features,
|
2021-10-04 19:55:44 +02:00
|
|
|
}
|
|
|
|
|
2021-12-10 00:10:18 +01:00
|
|
|
var enabledProperty bazel.BoolAttribute
|
|
|
|
if typ == "cc_binary_host" {
|
|
|
|
falseVal := false
|
|
|
|
enabledProperty.SetSelectValue(bazel.OsConfigurationAxis, android.Android.Name, &falseVal)
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx.CreateBazelTargetModuleWithRestrictions(bazel.BazelTargetModuleProperties{
|
2021-10-04 19:55:44 +02:00
|
|
|
Rule_class: "cc_binary",
|
|
|
|
Bzl_load_location: "//build/bazel/rules:cc_binary.bzl",
|
|
|
|
},
|
|
|
|
android.CommonAttributes{Name: m.Name()},
|
2021-12-10 00:10:18 +01:00
|
|
|
attrs,
|
|
|
|
enabledProperty)
|
2021-10-04 19:55:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// binaryAttributes contains Bazel attributes corresponding to a cc binary
|
|
|
|
type binaryAttributes struct {
|
|
|
|
binaryLinkerAttrs
|
|
|
|
Srcs bazel.LabelListAttribute
|
|
|
|
Srcs_c bazel.LabelListAttribute
|
|
|
|
Srcs_as bazel.LabelListAttribute
|
|
|
|
|
|
|
|
Copts bazel.StringListAttribute
|
|
|
|
Cppflags bazel.StringListAttribute
|
|
|
|
Conlyflags bazel.StringListAttribute
|
|
|
|
Asflags bazel.StringListAttribute
|
|
|
|
|
|
|
|
Deps bazel.LabelListAttribute
|
|
|
|
Dynamic_deps bazel.LabelListAttribute
|
|
|
|
Whole_archive_deps bazel.LabelListAttribute
|
|
|
|
System_deps bazel.LabelListAttribute
|
|
|
|
|
|
|
|
Local_includes bazel.StringListAttribute
|
|
|
|
Absolute_includes bazel.StringListAttribute
|
|
|
|
|
|
|
|
Linkopts bazel.StringListAttribute
|
|
|
|
Additional_linker_inputs bazel.LabelListAttribute
|
|
|
|
|
|
|
|
Link_crt bazel.BoolAttribute
|
|
|
|
Use_libcrt bazel.BoolAttribute
|
|
|
|
|
|
|
|
Rtti bazel.BoolAttribute
|
|
|
|
Stl *string
|
|
|
|
Cpp_std *string
|
|
|
|
|
|
|
|
Strip stripAttributes
|
|
|
|
|
|
|
|
Features bazel.StringListAttribute
|
|
|
|
}
|