Build Win32 with Yasm rather than MASM.
Although x86masm.pl exists, upstream's documentation suggest only x86nasm.pl is supported. Yasm seems to handle it fine with a small change. Change-Id: Ia77be57c6b743527225924b2b398f2f07a084a7f Reviewed-on: https://boringssl-review.googlesource.com/2092 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
3e700bb3e8
commit
03a739d8d2
@ -12,12 +12,16 @@ else()
|
||||
if (CMAKE_CL_64)
|
||||
message("Using masm")
|
||||
set(PERLASM_STYLE masm)
|
||||
enable_language(ASM_MASM)
|
||||
else()
|
||||
message("Using win32")
|
||||
set(PERLASM_STYLE win32)
|
||||
message("Using win32n")
|
||||
set(PERLASM_STYLE win32n)
|
||||
|
||||
# On 32-bit, upstream supports only NASM, not MASM. We'll use Yasm, specifically.
|
||||
set(CMAKE_ASM_NASM_COMPILER "yasm")
|
||||
enable_language(ASM_NASM)
|
||||
endif()
|
||||
set(ASM_EXT asm)
|
||||
enable_language(ASM_MASM)
|
||||
endif()
|
||||
|
||||
function(perlasm dest src)
|
||||
|
@ -83,7 +83,15 @@ sub ::file
|
||||
%ifidn __OUTPUT_FORMAT__,obj
|
||||
section code use32 class=code align=64
|
||||
%elifidn __OUTPUT_FORMAT__,win32
|
||||
%ifdef __YASM_VERSION_ID__
|
||||
%if __YASM_VERSION_ID__ < 01010000h
|
||||
%error yasm version 1.1.0 or later needed.
|
||||
%endif
|
||||
; Yasm automatically includes @feat.00 and complains about redefining it.
|
||||
; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
|
||||
%else
|
||||
\$\@feat.00 equ 1
|
||||
%endif
|
||||
section .text code align=64
|
||||
%else
|
||||
section .text code
|
||||
|
Loading…
Reference in New Issue
Block a user