summaryrefslogtreecommitdiffstats
path: root/github_macos_build.sh
diff options
context:
space:
mode:
authorCraig Kolb <craig.kolb@gmail.com>2022-05-31 11:16:34 -0700
committerGitHub <noreply@github.com>2022-05-31 14:16:34 -0400
commit1a83d50a5d9e85934386310c17a14860cc92e75c (patch)
tree710c74036362a3424bfe630c867f13be0455b899 /github_macos_build.sh
parent2d3392f22c894957d17dd13486e0565c4ecea89c (diff)
Work around MacOS compilation issue with embed stlib (#2255)
- The enable-stdlib-generator project is created with 'kind = StaticLib' to allow the build to work, even though the project doesn't actually create a library. - Unlike some other platforms, MacOs "ar" emits an error if no object files are listed to be added to an archive. This causes enable-stdlib-generator to fail on MacOS. - Changing the project's kind to "SharedLib" works around the issue. Other values for kind do not seem to work around the issue. - Add an optional flag to generatorProject to indicate that kind = "SharedLibrary" should be used, rather than "StaticLibrary" - Add MacOS fix for SharedLibraryUtils::getSharedLibraryFileName(). - Enable embed stdlib in github_macos_build.sh
Diffstat (limited to 'github_macos_build.sh')
-rw-r--r--github_macos_build.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/github_macos_build.sh b/github_macos_build.sh
index 739088814..5b8305a02 100644
--- a/github_macos_build.sh
+++ b/github_macos_build.sh
@@ -8,12 +8,7 @@ git describe --tags | sed -e "s/\(.*\)/\#define SLANG_TAG_VERSION \"\1\"/" > sla
cat slang-tag-version.h
# Create the makefile
-#
-# NOTE! For now we disable stdlib embedding, because on OSX it produces an error when generating
-# thinking it's creating a lib, but has no source
-#
-# --enable-embed-stdlib=true
-./premake5 gmake --cc=${CC} --enable-xlib=false --arch=${ARCH} --deps=true --no-progress=true
+./premake5 gmake --cc=${CC} --enable-xlib=false --enable-embed-stdlib=true --arch=${ARCH} --deps=true --no-progress=true
# Build the configuration
make config=${CONFIGURATION}_x64 -j`sysctl -n hw.ncpu`