33 lines
959 B
Diff
33 lines
959 B
Diff
diff -crB zig.orig/CMakeLists.txt zig/CMakeLists.txt
|
|
*** zig.orig/CMakeLists.txt 2024-04-16 00:59:10.664981173 +0200
|
|
--- zig/CMakeLists.txt 2024-04-16 01:01:00.747848186 +0200
|
|
***************
|
|
*** 904,909 ****
|
|
--- 904,919 ----
|
|
set(ZIG_PIE_ARG "")
|
|
endif()
|
|
|
|
+ # Use LIBRARY_PATH
|
|
+ string(REPLACE ":" ";" LIBRARY_PATH "$ENV{LIBRARY_PATH}")
|
|
+ set(SEARCH_PATHS "")
|
|
+
|
|
+ foreach(PATH ${LIBRARY_PATH})
|
|
+ list(APPEND SEARCH_PATHS "--search-prefix ${PATH}")
|
|
+ endforeach()
|
|
+
|
|
+ list(JOIN SEARCH_PATHS " " SEARCH_PREFIXES)
|
|
+
|
|
# -Dno-langref is currently hardcoded because building the langref takes too damn long
|
|
# To obtain these two forms of documentation, run zig build against stage3 rather than stage2.
|
|
set(ZIG_BUILD_ARGS
|
|
***************
|
|
*** 919,924 ****
|
|
--- 929,935 ----
|
|
"-Dtarget=${ZIG_TARGET_TRIPLE}"
|
|
"-Dcpu=${ZIG_TARGET_MCPU}"
|
|
"-Dversion-string=${RESOLVED_ZIG_VERSION}"
|
|
+ "${SEARCH_PREFIXES}"
|
|
)
|
|
|
|
add_custom_target(stage3 ALL
|