From 80fec097b1451db5bebedbbed0e8b1d319db3274 Mon Sep 17 00:00:00 2001 From: Jerome Gaillard Date: Thu, 29 Nov 2018 15:34:32 +0000 Subject: [PATCH] Add flags for Windows assembly builds This is necessary to build libjpeg for Windows. Test: lunch sdk, make libjpeg Change-Id: I6ace0e524d1d710b5ce78320e7a06777511d1634 --- cc/config/x86_windows_host.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cc/config/x86_windows_host.go b/cc/config/x86_windows_host.go index 6300a1bcf..e23c0a08f 100644 --- a/cc/config/x86_windows_host.go +++ b/cc/config/x86_windows_host.go @@ -140,6 +140,9 @@ func init() { pctx.StaticVariable("WindowsX8664ClangCppflags", strings.Join(windowsX8664ClangCppflags, " ")) pctx.StaticVariable("WindowsIncludeFlags", strings.Join(windowsIncludeFlags, " ")) + // Yasm flags + pctx.StaticVariable("WindowsX86YasmFlags", "-f win32 -m x86") + pctx.StaticVariable("WindowsX8664YasmFlags", "-f win64 -m amd64") } type toolchainWindows struct { @@ -228,6 +231,14 @@ func (t *toolchainWindowsX8664) ClangLldflags() string { return "${config.WindowsClangLldflags} ${config.WindowsX8664ClangLldflags}" } +func (t *toolchainWindowsX86) YasmFlags() string { + return "${config.WindowsX86YasmFlags}" +} + +func (t *toolchainWindowsX8664) YasmFlags() string { + return "${config.WindowsX8664YasmFlags}" +} + func (t *toolchainWindows) ShlibSuffix() string { return ".dll" }