Skip to content

Commit e97e7e5

Browse files
authored
Revert "Fetch slang-llvm.so from correct release (#4847)" (#4893)
This reverts commit 579d59c.
1 parent 359e96c commit e97e7e5

File tree

3 files changed

+12
-117
lines changed

3 files changed

+12
-117
lines changed

CMakeLists.txt

+12-14
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ include(Glob)
4646
include(LLVM)
4747
include(SlangTarget)
4848
include(AutoOption)
49-
include(GitHubRelease)
5049

5150
#
5251
# Options
@@ -126,26 +125,25 @@ enum_option(
126125
"How to get or build slang-llvm:"
127126
# Options
128127
FETCH_BINARY
129-
"Use a binary distribution of the slang-llvm library instead of building or using LLVM (default)"
128+
"Use a binary distribution of the slang-llvm library instead of building or using LLVM (default for Windows)"
130129
USE_SYSTEM_LLVM
131-
"Build slang-llvm using system-provided LLVM and Clang binaries"
130+
"Build slang-llvm using system-provided LLVM and Clang binaries (default for non-Windows hosts)"
132131
DISABLE
133132
"Do not build llvm or fetch slang-llvm"
134133
)
135-
136-
if(SLANG_SLANG_LLVM_FLAVOR MATCHES FETCH_BINARY)
137-
# If the user didn't specify a URL, find the best one now
138-
if(NOT SLANG_SLANG_LLVM_BINARY_URL)
139-
get_best_slang_binary_release_url(url)
140-
if(NOT url)
141-
message(FATAL_ERROR "Unable to find binary release for slang-llvm, please set a different SLANG_SLANG_LLVM_FLAVOR or set SLANG_SLANG_LLVM_BINARY_URL manually")
142-
endif()
143-
endif()
134+
macro(slang_llvm_binary_url_option version filename)
144135
set(SLANG_SLANG_LLVM_BINARY_URL
145-
${url}
136+
"https://github.com/shader-slang/slang-llvm/releases/download/${version}/${filename}"
146137
CACHE STRING
147138
"URL specifying the location of the slang-llvm prebuilt library"
148139
)
140+
endmacro()
141+
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
142+
slang_llvm_binary_url_option("v13.x-43" "slang-llvm-13.x-43-win64.zip")
143+
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
144+
slang_llvm_binary_url_option("v13.x-43" "slang-llvm-v13.x-43-macosx-x86_64-release.zip")
145+
else()
146+
slang_llvm_binary_url_option("v13.x-43" "slang-llvm-v13.x-43-linux-x86_64-release.zip")
149147
endif()
150148

151149
#
@@ -394,7 +392,7 @@ if(SLANG_SLANG_LLVM_FLAVOR STREQUAL "FETCH_BINARY")
394392
endif()
395393

396394
set(slang_llvm_dest_object
397-
${CMAKE_BINARY_DIR}/$<CONFIG>/${module_subdir}/${slang_llvm_filename}
395+
${CMAKE_BINARY_DIR}/$<CONFIG>/${runtime_subdir}/${slang_llvm_filename}
398396
)
399397
add_custom_command(
400398
OUTPUT ${slang_llvm_dest_object}

cmake/GitHubRelease.cmake

-99
This file was deleted.

docs/building.md

-4
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ There are several options for getting llvm-support:
101101
- You can set `SLANG_SLANG_LLVM_BINARY_URL` to point to a local
102102
`libslang-llvm.so/slang-llvm.dll` or set it to a URL of an zip/archive
103103
containing such a file
104-
- If this isn't set then the build system tries to download it from the
105-
release on github matching the current tag. If such a tag doesn't exist
106-
or doesn't have the correct os*arch combination then the latest release
107-
will be tried.
108104
- Use a system supplied LLVM: `-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM`, you
109105
must have llvm-13.0 and a matching libclang installed. It's important that
110106
either:

0 commit comments

Comments
 (0)