Merge changes I2731ef15,Ib4b03035
* changes:
Add a timestamp touch rule.
Remove the implicit "_" in subnames.
diff --git a/cc/builder.go b/cc/builder.go
index 4efcc27..49f8871 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -369,11 +369,11 @@
libFlagsList = append(libFlagsList, staticLibs.Strings()...)
- if groupLate && len(lateStaticLibs) > 0 {
+ if groupLate && !ctx.Darwin() && len(lateStaticLibs) > 0 {
libFlagsList = append(libFlagsList, "-Wl,--start-group")
}
libFlagsList = append(libFlagsList, lateStaticLibs.Strings()...)
- if groupLate && len(lateStaticLibs) > 0 {
+ if groupLate && !ctx.Darwin() && len(lateStaticLibs) > 0 {
libFlagsList = append(libFlagsList, "-Wl,--end-group")
}
diff --git a/cc/cc.go b/cc/cc.go
index f8723bb..89f40b3 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1337,7 +1337,7 @@
deps.ReexportSharedLibHeaders = append(deps.ReexportSharedLibHeaders, linker.Properties.Export_shared_lib_headers...)
if !ctx.sdk() && ctx.ModuleName() != "libcompiler_rt-extras" {
- deps.StaticLibs = append(deps.StaticLibs, "libcompiler_rt-extras")
+ deps.LateStaticLibs = append(deps.LateStaticLibs, "libcompiler_rt-extras")
}
if ctx.Device() {
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 172aae7..08ffff4 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -141,9 +141,10 @@
ctx.ModuleErrorf("unknown global sanitizer option %s", globalSanitizers[0])
}
}
- if Bool(s.All_undefined) || Bool(s.Undefined) || Bool(s.Address) ||
- Bool(s.Thread) || Bool(s.Coverage) || Bool(s.Safestack) {
- sanitize.Properties.SanitizerEnabled = true
+
+ if ctx.staticBinary() {
+ s.Address = nil
+ s.Thread = nil
}
if Bool(s.All_undefined) {
@@ -157,6 +158,11 @@
// TODO(ccross): error for compile_multilib = "32"?
}
+ if Bool(s.All_undefined) || Bool(s.Undefined) || Bool(s.Address) ||
+ Bool(s.Thread) || Bool(s.Coverage) || Bool(s.Safestack) {
+ sanitize.Properties.SanitizerEnabled = true
+ }
+
if Bool(s.Coverage) {
if !Bool(s.Address) {
ctx.ModuleErrorf(`Use of "coverage" also requires "address"`)