cmake: expose ZIG_TARGET_MCPU option

master
Andrew Kelley 2020-04-08 17:41:51 -04:00
parent 29ea425ca2
commit d5087ccbc8
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ option(ZIG_TEST_COVERAGE "Build Zig with test coverage instrumentation" OFF)
option(ZIG_FORCE_EXTERNAL_LLD "does nothing" OFF)
set(ZIG_TARGET_TRIPLE "native" CACHE STRING "arch-os-abi to output binaries for")
set(ZIG_TARGET_MCPU "baseline" CACHE STRING "-mcpu parameter to output binaries for")
set(ZIG_EXECUTABLE "" CACHE STRING "(when cross compiling) path to already-built zig binary")
find_package(llvm)
@ -433,7 +434,7 @@ endif()
set(BUILD_LIBSTAGE2_ARGS "build-lib"
"src-self-hosted/stage2.zig"
-target "${ZIG_TARGET_TRIPLE}"
-mcpu=baseline
"-mcpu=${ZIG_TARGET_MCPU}"
--name zigstage2
--override-lib-dir "${CMAKE_SOURCE_DIR}/lib"
--cache on