summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-02-15 15:47:45 -0500
committerGitHub <noreply@github.com>2022-02-15 15:47:45 -0500
commit505860911a562f25a8ada1bc294786c3a63b848f (patch)
tree2d455f960a3e93d96d4e623e0ad929a8aa885cf7
parent1278e230f30773137d3b503031c8d3669f681e02 (diff)
Add OSX LLVM JIT support (#2130)
* #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes. Added compiler crash with generic defined in a function. Added enum-flags test that works (by limiting backing type to int), and using __EnumType constraint. * Add comment about crash. * Disable crashing test. * Fixes to make compile on OSX. * Add github build for OSX. * Make premake generator a utility. * Fix osx compilation issue. * More fixes for OSX build. * OSX fix due to ambiguity around size_t and integer types. * Disable xlib on build on osx. * Use 'prebuildcommands' to make prebuild make utility projects do something. * Small fixes for premake so utility works on linux/osx. * Another hack to try and make generators run when 'utility' * Fix typo in macos.yml. * Revert premake to old style, and disable stdlib embedding on OSX. * OSX testing. * Fix pipe handling for OSX. * Enable testing on OSX. * Small fix because uname -p is not x64 on darwin. * Use glslang from slang-binaries for OSX. * Add slang-llvm on OSX. * Upgrade slang-llvm. * Update slang-llvm for OSX JIT fix. * slang llvm 26 * Upgrade slang-llvm. * Use slangUtil to get shared library filename. * Use fixed slang-binaries. * Another small fix. * Rename linux build for clarity.
-rw-r--r--.github/workflows/linux.yml (renamed from .github/workflows/c-cpp.yml)2
-rw-r--r--deps/target-deps.json10
m---------external/slang-binaries0
-rw-r--r--premake5.lua29
4 files changed, 13 insertions, 28 deletions
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/linux.yml
index e848b8170..d9d0a7b66 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/linux.yml
@@ -1,4 +1,4 @@
-name: C/C++ CI
+name: Linux Build CI
on:
push:
diff --git a/deps/target-deps.json b/deps/target-deps.json
index 3f43fe662..1b7a61f55 100644
--- a/deps/target-deps.json
+++ b/deps/target-deps.json
@@ -4,14 +4,14 @@
"dependencies" : [
{
"name" : "slang-llvm",
- "baseUrl" : "https://github.com/shader-slang/slang-llvm/releases/download/v13.x-22/",
+ "baseUrl" : "https://github.com/shader-slang/slang-llvm/releases/download/v13.x-27/",
"optional" : true,
"packages" :
{
- "windows-x86_64" : { "type" : "url", "path" : "slang-llvm-13.x-22-win64.zip" },
- "windows-x86" : { "type": "url", "path" : "slang-llvm-13.x-22-win32.zip" },
- "linux-x86_64" : { "type": "url", "path" : "slang-llvm-v13.x-22-linux-x86_64-release.zip" },
- "macosx-x86_64" : { "type": "url", "path" : "slang-llvm-v13.x-22-macosx-x86_64-release.zip" }
+ "windows-x86_64" : { "type" : "url", "path" : "slang-llvm-13.x-27-win64.zip" },
+ "windows-x86" : { "type": "url", "path" : "slang-llvm-13.x-27-win32.zip" },
+ "linux-x86_64" : { "type": "url", "path" : "slang-llvm-v13.x-27-linux-x86_64-release.zip" },
+ "macosx-x86_64" : { "type": "url", "path" : "slang-llvm-v13.x-27-macosx-x86_64-release.zip" }
}
},
{
diff --git a/external/slang-binaries b/external/slang-binaries
-Subproject 8324a9309a60a8f9472abd0ce91f6122c640453
+Subproject d5d689343969ba752f921f57f59f68806ea93c2
diff --git a/premake5.lua b/premake5.lua
index cbe062617..d5a9d102a 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -1333,36 +1333,21 @@ newoption {
local slangLLVMPath = deps:getProjectRelativePath("slang-llvm", "../../..")
if slangLLVMPath then
-
- filter { "system:windows" }
- postbuildcommands {
- "{COPY} " .. slangLLVMPath .."/bin/" .. targetName .. "/release/slang-llvm.dll %{cfg.targetdir}"
- }
-
- filter { "system:linux" }
+ filter { "system:linux or macosx or windows" }
+ local sharedLibName = slangUtil.getSharedLibraryFileName(targetInfo, "slang-llvm")
postbuildcommands {
- "{COPY} " .. slangLLVMPath .. "/bin/" .. targetName .. "/release/libslang-llvm.so %{cfg.targetdir}"
+ "{COPY} " .. slangLLVMPath .."/bin/" .. targetName .. "/release/" .. sharedLibName .. " %{cfg.targetdir}"
}
end
-- If we are not building glslang from source, then be
-- sure to copy a binary copy over to the output directory
if not buildGlslang then
- filter { "system:windows" }
- postbuildcommands {
- "{COPY} ../../../external/slang-binaries/bin/" .. targetName .. "/slang-glslang.dll %{cfg.targetdir}"
- }
-
- filter { "system:linux" }
- postbuildcommands {
- "{COPY} ../../../external/slang-binaries/bin/" .. targetName .. "/libslang-glslang.so %{cfg.targetdir}"
- }
-
- filter { "system:macosx" }
+ filter { "system:linux or macosx or windows" }
+ local sharedLibName = slangUtil.getSharedLibraryFileName(targetInfo, "slang-glslang")
postbuildcommands {
- "{COPY} ../../../external/slang-binaries/bin/" .. targetName .. "/libslang-glslang.dylib %{cfg.targetdir}"
- }
-
+ "{COPY} ../../../external/slang-binaries/bin/" .. targetName .. "/" .. sharedLibName .. " %{cfg.targetdir}"
+ }
end
filter {"configurations:debug"}