From 1a83d50a5d9e85934386310c17a14860cc92e75c Mon Sep 17 00:00:00 2001 From: Craig Kolb Date: Tue, 31 May 2022 11:16:34 -0700 Subject: 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 --- github_macos_build.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'github_macos_build.sh') 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` -- cgit v1.2.3