Skip to content
Snippets Groups Projects
Verified Commit f6cf4001 authored by Moritz Angermann's avatar Moritz Angermann
Browse files

`--via-asm` only for windows targets

Reviewers: trofi, bgamari

Reviewed By: trofi, bgamari

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4467
parent df7ac37d
No related merge requests found
......@@ -649,12 +649,16 @@ $(eval $(call set_stage_HSC2HS_OPTS,0))
$(eval $(call set_stage_HSC2HS_OPTS,1))
$(eval $(call set_stage_HSC2HS_OPTS,2))
ifeq "$(CrossCompiling)" "YES"
SRC_HSC2HS_OPTS_STAGE1 += --cross-compile
SRC_HSC2HS_OPTS_STAGE2 += --cross-compile
ifeq "$(Windows_Target)" "YES"
# We'll assume we compile with gcc or clang, and both support `-S` and can as such use the
# --via-asm pass, which should be faster and is required for cross compiling to windows, as
# the c compiler complains about non-constant expressions even though they are constant and
# end up as constants in the assembly.
SRC_HSC2HS_OPTS_STAGE1 += --cross-compile --via-asm
SRC_HSC2HS_OPTS_STAGE2 += --cross-compile --via-asm
SRC_HSC2HS_OPTS_STAGE1 += --via-asm
SRC_HSC2HS_OPTS_STAGE2 += --via-asm
endif
endif
SRC_HSC2HS_OPTS_STAGE0 += --cflag=-D$(HostArch_CPP)_HOST_ARCH --cflag=-D$(HostOS_CPP)_HOST_OS
SRC_HSC2HS_OPTS_STAGE1 += --cflag=-D$(TargetArch_CPP)_HOST_ARCH --cflag=-D$(TargetOS_CPP)_HOST_OS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment