aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-03-30 00:01:12 -0700
committerDan Willemsen <dwillemsen@google.com>2016-03-30 12:35:07 -0700
commit01fdd3d8c1867d71d718ed900ecf41f7f7245d18 (patch)
tree2659bada760cd08161171ec3a08067248930f263 /cc
parentd6d6b6942d9c908c63c8846537b05e405d487d1a (diff)
downloadbuild_soong-01fdd3d8c1867d71d718ed900ecf41f7f7245d18.tar.gz
build_soong-01fdd3d8c1867d71d718ed900ecf41f7f7245d18.tar.bz2
build_soong-01fdd3d8c1867d71d718ed900ecf41f7f7245d18.zip
Various host flag updates to match Make
Some of these are updates from the old build system, others are just differences/bugs being corrected. Change-Id: Ied7f47ade495dcb26ba3611e636869cba283860f
Diffstat (limited to 'cc')
-rw-r--r--cc/x86_darwin_host.go11
-rw-r--r--cc/x86_linux_host.go5
-rw-r--r--cc/x86_windows_host.go10
3 files changed, 15 insertions, 11 deletions
diff --git a/cc/x86_darwin_host.go b/cc/x86_darwin_host.go
index bff9a03f..87e50b06 100644
--- a/cc/x86_darwin_host.go
+++ b/cc/x86_darwin_host.go
@@ -72,6 +72,10 @@ var (
"-fstack-protector-strong",
}...)
+ darwinX86ClangCflags = append(clangFilterUnknownCflags(darwinX86Cflags), []string{
+ "-msse3",
+ }...)
+
darwinClangLdflags = clangFilterUnknownCflags(darwinLdflags)
darwinX86ClangLdflags = clangFilterUnknownCflags(darwinX86Ldflags)
@@ -126,8 +130,7 @@ func init() {
pctx.StaticVariable("darwinX86Ldflags", strings.Join(darwinX86Ldflags, " "))
pctx.StaticVariable("darwinX8664Ldflags", strings.Join(darwinX8664Ldflags, " "))
- pctx.StaticVariable("darwinX86ClangCflags",
- strings.Join(clangFilterUnknownCflags(darwinX86Cflags), " "))
+ pctx.StaticVariable("darwinX86ClangCflags", strings.Join(darwinX86ClangCflags, " "))
pctx.StaticVariable("darwinX8664ClangCflags",
strings.Join(clangFilterUnknownCflags(darwinX8664Cflags), " "))
pctx.StaticVariable("darwinX86ClangLdflags", strings.Join(darwinX86ClangLdflags, " "))
@@ -215,7 +218,7 @@ func (t *toolchainDarwin) IncludeFlags() string {
}
func (t *toolchainDarwinX86) ClangTriple() string {
- return "i686-darwin-gnu"
+ return "i686-apple-darwin"
}
func (t *toolchainDarwinX86) ClangCflags() string {
@@ -223,7 +226,7 @@ func (t *toolchainDarwinX86) ClangCflags() string {
}
func (t *toolchainDarwinX8664) ClangTriple() string {
- return "x86_64-darwin-gnu"
+ return "x86_64-apple-darwin"
}
func (t *toolchainDarwinX8664) ClangCflags() string {
diff --git a/cc/x86_linux_host.go b/cc/x86_linux_host.go
index 528d2a72..e05d2a52 100644
--- a/cc/x86_linux_host.go
+++ b/cc/x86_linux_host.go
@@ -68,13 +68,14 @@ var (
linuxClangCflags = append(clangFilterUnknownCflags(linuxCflags), []string{
"--gcc-toolchain=${linuxGccRoot}",
- "--sysroot=${linuxGccRoot}/sysroot",
+ "--sysroot ${linuxGccRoot}/sysroot",
"-fstack-protector-strong",
}...)
linuxClangLdflags = append(clangFilterUnknownCflags(linuxLdflags), []string{
"--gcc-toolchain=${linuxGccRoot}",
- "--sysroot=${linuxGccRoot}/sysroot",
+ "--sysroot ${linuxGccRoot}/sysroot",
+ "-B${linuxGccRoot}/${linuxGccTriple}/bin",
}...)
linuxX86ClangLdflags = append(clangFilterUnknownCflags(linuxX86Ldflags), []string{
diff --git a/cc/x86_windows_host.go b/cc/x86_windows_host.go
index ad6fdf3d..60d88a19 100644
--- a/cc/x86_windows_host.go
+++ b/cc/x86_windows_host.go
@@ -28,7 +28,6 @@ var (
"-DUSE_MINGW",
"-DWIN32_LEAN_AND_MEAN",
"-Wno-unused-parameter",
- "-m32",
// Workaround differences in inttypes.h between host and target.
//See bug 12708004.
@@ -37,12 +36,14 @@ var (
// Use C99-compliant printf functions (%zd).
"-D__USE_MINGW_ANSI_STDIO=1",
- // Admit to using >= Win2K. Both are needed because of <_mingw.h>.
- "-D_WIN32_WINNT=0x0500",
- "-DWINVER=0x0500",
+ // Admit to using >= Vista. Both are needed because of <_mingw.h>.
+ "-D_WIN32_WINNT=0x0600",
+ "-DWINVER=0x0600",
// Get 64-bit off_t and related functions.
"-D_FILE_OFFSET_BITS=64",
+ "--sysroot ${windowsGccRoot}/${windowsGccTriple}",
+
// HOST_RELEASE_CFLAGS
"-O2", // from build/core/combo/select.mk
"-g", // from build/core/combo/select.mk
@@ -55,7 +56,6 @@ var (
}
windowsLdflags = []string{
- "-L${windowsGccRoot}/${windowsGccTriple}",
"--enable-stdcall-fixup",
}