aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/config/x86_darwin_host.go10
-rw-r--r--cc/config/x86_linux_host.go11
2 files changed, 21 insertions, 0 deletions
diff --git a/cc/config/x86_darwin_host.go b/cc/config/x86_darwin_host.go
index 65fa1edd..bb751feb 100644
--- a/cc/config/x86_darwin_host.go
+++ b/cc/config/x86_darwin_host.go
@@ -159,6 +159,8 @@ func init() {
strings.Join(ClangFilterUnknownCflags(darwinX8664Cflags), " "))
pctx.StaticVariable("DarwinX86ClangLdflags", strings.Join(darwinX86ClangLdflags, " "))
pctx.StaticVariable("DarwinX8664ClangLdflags", strings.Join(darwinX8664ClangLdflags, " "))
+ pctx.StaticVariable("DarwinX86YasmFlags", "-f macho -m x86")
+ pctx.StaticVariable("DarwinX8664YasmFlags", "-f macho -m amd64")
}
func xcrun(config android.Config, args ...string) (string, error) {
@@ -276,6 +278,14 @@ func (t *toolchainDarwinX8664) ClangLdflags() string {
return "${config.DarwinClangLdflags} ${config.DarwinX8664ClangLdflags}"
}
+func (t *toolchainDarwinX86) YasmFlags() string {
+ return "${config.DarwinX86YasmFlags}"
+}
+
+func (t *toolchainDarwinX8664) YasmFlags() string {
+ return "${config.DarwinX8664YasmFlags}"
+}
+
func (t *toolchainDarwin) ShlibSuffix() string {
return ".dylib"
}
diff --git a/cc/config/x86_linux_host.go b/cc/config/x86_linux_host.go
index 80e92895..65ac603c 100644
--- a/cc/config/x86_linux_host.go
+++ b/cc/config/x86_linux_host.go
@@ -160,6 +160,9 @@ func init() {
pctx.StaticVariable("LinuxX8664ClangLdflags", strings.Join(linuxX8664ClangLdflags, " "))
pctx.StaticVariable("LinuxX86ClangCppflags", strings.Join(linuxX86ClangCppflags, " "))
pctx.StaticVariable("LinuxX8664ClangCppflags", strings.Join(linuxX8664ClangCppflags, " "))
+ // Yasm flags
+ pctx.StaticVariable("LinuxX86YasmFlags", "-f elf32 -m x86")
+ pctx.StaticVariable("LinuxX8664YasmFlags", "-f elf64 -m amd64")
}
type toolchainLinux struct {
@@ -252,6 +255,14 @@ func (t *toolchainLinuxX8664) ClangLdflags() string {
return "${config.LinuxClangLdflags} ${config.LinuxX8664ClangLdflags}"
}
+func (t *toolchainLinuxX86) YasmFlags() string {
+ return "${config.LinuxX86YasmFlags}"
+}
+
+func (t *toolchainLinuxX8664) YasmFlags() string {
+ return "${config.LinuxX8664YasmFlags}"
+}
+
func (t *toolchainLinux) AvailableLibraries() []string {
return linuxAvailableLibraries
}