OSX: Added separate osx-arm64 build configuration.

This commit is contained in:
Бранимир Караџић 2020-12-31 18:17:39 -08:00
parent 3bc0362ed2
commit 76f3e0590f
9 changed files with 64 additions and 60 deletions

View File

@ -43,7 +43,8 @@ projgen: ## Generate project files for all configurations.
$(GENIE) --with-tools --with-combined-examples --vs=winstore100 vs2017
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-x64 gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-arm64 gmake
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx xcode9
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode9
$(GENIE) --with-combined-examples --with-shared-lib --gcc=freebsd gmake
@ -169,23 +170,26 @@ vs2017-winstore100-release64: .build/projects/vs2017-winstore100 ## Build - vs20
devenv .build/projects/vs2017-winstore100/bgfx.sln /Build "Release|x64"
vs2017-winstore100: vs2017-winstore100-debug32 vs2017-winstore100-release32 vs2017-winstore100-debug64 vs2017-winstore100-release64 ## Build - vs2017-winstore100 x86/x64 Debug and Release
.build/projects/gmake-osx:
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake
osx-debug64: osx-debug64-x86 osx-debug64-arm64 ## Build - macOS Universal Debug
osx-release64: osx-release64-x86 osx-release64-arm64 ## Build - macOS Universal Release
osx: osx-debug64 osx-release64 ## Build - macOS Universal Debug and Release
.build/projects/gmake-osx-x64:
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-x64 gmake
.build/projects/gmake-osx-arm64:
$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-arm64 gmake
osx-debug64-x86: .build/projects/gmake-osx ## Build - macOS x64 Debug
$(MAKE) -C .build/projects/gmake-osx config=debug64
osx-release64-x86: .build/projects/gmake-osx ## Build - macOS x64 Release
$(MAKE) -C .build/projects/gmake-osx config=release64
osx-x86: osx-debug64 osx-release64 ## Build - macOS x64 Debug and Release
osx-debug: osx-x64-debug osx-arm64-debug ## Build - macOS Universal Debug
osx-release: osx-x64-release osx-arm64-release ## Build - macOS Universal Release
osx: osx-debug osx-release ## Build - macOS Universal Debug and Release
osx-debug64-arm64: .build/projects/gmake-osx ## Build - macOS ARM Debug
$(MAKE) -C .build/projects/gmake-osx config=debug64 ARCH="-arch arm64 -Wno-error=unused-command-line-argument -Wno-unused-command-line-argument"
osx-release64-arm64: .build/projects/gmake-osx ## Build - macOS ARM Release
$(MAKE) -C .build/projects/gmake-osx config=release64 ARCH="-arch arm64 -Wno-error=unused-command-line-argument -Wno-unused-command-line-argument"
osx-arm: osx-debug64-arm64 osx-release64-arm64 ## Build - macOS ARM Debug and Release
osx-x64-debug: .build/projects/gmake-osx-x64 ## Build - macOS x64 Debug
$(MAKE) -C .build/projects/gmake-osx-x64 config=debug
osx-x64-release: .build/projects/gmake-osx-x64 ## Build - macOS x64 Release
$(MAKE) -C .build/projects/gmake-osx-x64 config=release
osx-x64: osx-x64-debug osx-x64-release ## Build - macOS x64 Debug and Release
osx-arm64-debug: .build/projects/gmake-osx-arm64 ## Build - macOS ARM Debug
$(MAKE) -C .build/projects/gmake-osx-arm64 config=debug
osx-arm64-release: .build/projects/gmake-osx-arm64 ## Build - macOS ARM Release
$(MAKE) -C .build/projects/gmake-osx-arm64 config=release
osx-arm: osx-arm64-debug osx-arm64-release ## Build - macOS ARM Debug and Release
.build/projects/gmake-ios-arm:
$(GENIE) --gcc=ios-arm gmake
@ -227,7 +231,7 @@ rpi-release: .build/projects/gmake-rpi ## Build - RasberryPi Release
$(MAKE) -R -C .build/projects/gmake-rpi config=release
rpi: rpi-debug rpi-release ## Build - RasberryPi Debug and Release
build-darwin: osx
build-darwin: osx-x64
build-linux: linux-debug64 linux-release64
@ -257,9 +261,9 @@ UNAME := $(shell uname)
ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin FreeBSD GNU/kFreeBSD))
ifeq ($(UNAME),$(filter $(UNAME),Darwin))
OS=darwin
BUILD_PROJECT_DIR=gmake-osx
BUILD_OUTPUT_DIR=osx64_clang
BUILD_TOOLS_CONFIG=release64
BUILD_PROJECT_DIR=gmake-osx-x64
BUILD_OUTPUT_DIR=osx-x64
BUILD_TOOLS_CONFIG=release
BUILD_TOOLS_SUFFIX=Release
EXE=
else
@ -337,16 +341,16 @@ dist-linux: .build/projects/gmake-linux
$(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 texturev
$(SILENT) cp .build/linux64_gcc/bin/texturevRelease tools/bin/linux/texturev
dist-darwin: .build/projects/gmake-osx
$(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 geometryc
$(SILENT) cp .build/osx64_clang/bin/geometrycRelease tools/bin/darwin/geometryc
$(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 geometryv
$(SILENT) cp .build/osx64_clang/bin/geometryvRelease tools/bin/darwin/geometryv
$(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 shaderc
$(SILENT) cp .build/osx64_clang/bin/shadercRelease tools/bin/darwin/shaderc
$(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturec
$(SILENT) cp .build/osx64_clang/bin/texturecRelease tools/bin/darwin/texturec
$(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturev
$(SILENT) cp .build/osx64_clang/bin/texturevRelease tools/bin/darwin/texturev
dist-darwin: .build/projects/gmake-osx-x64
$(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 geometryc
$(SILENT) cp .build/osx-x64/bin/geometrycRelease tools/bin/darwin/geometryc
$(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 geometryv
$(SILENT) cp .build/osx-x64/bin/geometryvRelease tools/bin/darwin/geometryv
$(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 shaderc
$(SILENT) cp .build/osx-x64/bin/shadercRelease tools/bin/darwin/shaderc
$(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 texturec
$(SILENT) cp .build/osx-x64/bin/texturecRelease tools/bin/darwin/texturec
$(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 texturev
$(SILENT) cp .build/osx-x64/bin/texturevRelease tools/bin/darwin/texturev
dist: clean dist-windows dist-linux dist-darwin

View File

@ -138,7 +138,7 @@ function bgfxProjectBase(_kind, _defines)
"-Wno-microsoft-const-init", -- default initialization of an object of const type '' without a user-provided default constructor is a Microsoft extension
}
configuration { "osx" }
configuration { "osx*" }
buildoptions { "-x objective-c++" } -- additional build option for osx
linkoptions {
"-framework Cocoa",
@ -232,7 +232,7 @@ function bgfxProjectBase(_kind, _defines)
path.join(BGFX_DIR, "src/vertexlayout.cpp"),
}
configuration { "xcode* or osx or ios*" }
configuration { "xcode* or osx* or ios*" }
files {
path.join(BGFX_DIR, "src/amalgamated.mm"),
}
@ -243,7 +243,7 @@ function bgfxProjectBase(_kind, _defines)
path.join(BGFX_DIR, "src/amalgamated.cpp"),
}
configuration { "not (xcode* or osx or ios*)" }
configuration { "not (xcode* or osx* or ios*)" }
excludes {
path.join(BGFX_DIR, "src/**.mm"),
}
@ -251,7 +251,7 @@ function bgfxProjectBase(_kind, _defines)
configuration {}
else
configuration { "xcode* or osx or ios*" }
configuration { "xcode* or osx* or ios*" }
files {
path.join(BGFX_DIR, "src/glcontext_**.mm"),
path.join(BGFX_DIR, "src/renderer_**.mm"),

View File

@ -77,7 +77,7 @@ project ("example-common")
}
end
configuration { "osx or ios* or tvos*" }
configuration { "osx* or ios* or tvos*" }
files {
path.join(BGFX_DIR, "examples/common/**.mm"),
}

View File

@ -255,7 +255,7 @@ function exampleProjectDefaults()
}
end
configuration { "osx" }
configuration { "osx*" }
libdirs { "$(SDL2_DIR)/lib" }
configuration {}
@ -280,7 +280,7 @@ function exampleProjectDefaults()
}
end
configuration { "osx" }
configuration { "osx*" }
linkoptions {
"-framework CoreVideo",
"-framework IOKit",
@ -401,7 +401,7 @@ function exampleProjectDefaults()
"pthread",
}
configuration { "osx" }
configuration { "osx*" }
linkoptions {
"-framework Cocoa",
"-framework QuartzCore",

View File

@ -33,7 +33,7 @@ project "geometryc"
"psapi",
}
configuration { "osx" }
configuration { "osx*" }
links {
"Cocoa.framework",
}

View File

@ -52,7 +52,7 @@ project ("geometryv")
"Xcursor",
}
configuration { "osx" }
configuration { "osx*" }
linkoptions {
"-framework CoreVideo",
"-framework IOKit",
@ -138,7 +138,7 @@ project ("geometryv")
"pthread",
}
configuration { "osx" }
configuration { "osx*" }
linkoptions {
"-framework Cocoa",
"-framework Metal",

View File

@ -141,7 +141,7 @@ project "spirv-opt"
"/wd4706", -- warning C4706: assignment within conditional expression
}
configuration { "mingw* or linux or osx" }
configuration { "mingw* or linux* or osx*" }
buildoptions {
"-Wno-switch",
}
@ -197,7 +197,7 @@ project "spirv-cross"
"/wd4715", -- warning C4715: '': not all control paths return a value
}
configuration { "mingw* or linux or osx" }
configuration { "mingw* or linux* or osx*" }
buildoptions {
"-Wno-type-limits",
}
@ -268,12 +268,17 @@ project "glslang"
"/wd4838", -- warning C4838: conversion from 'spv::GroupOperation' to 'unsigned int' requires a narrowing conversion
}
configuration { "mingw* or linux or osx" }
configuration { "mingw* or linux*" }
buildoptions {
"-Wno-ignored-qualifiers",
"-Wno-implicit-fallthrough",
"-Wno-logical-op",
"-Wno-maybe-uninitialized",
}
configuration { "mingw* or linux* or osx*" }
buildoptions {
"-fno-strict-aliasing", -- glslang has bugs if strict aliasing is used.
"-Wno-ignored-qualifiers",
"-Wno-implicit-fallthrough",
"-Wno-missing-field-initializers",
"-Wno-reorder",
"-Wno-return-type",
@ -287,7 +292,7 @@ project "glslang"
"-Wno-unused-variable",
}
configuration { "osx" }
configuration { "osx*" }
buildoptions {
"-Wno-c++11-extensions",
"-Wno-unused-const-variable",
@ -299,11 +304,6 @@ project "glslang"
"-Wno-unused-but-set-variable",
}
configuration { "mingw* or linux or osx" }
buildoptions {
"-fno-strict-aliasing", -- glslang has bugs if strict aliasing is used.
}
configuration {}
project "glsl-optimizer"
@ -530,7 +530,7 @@ project "glsl-optimizer"
"/wd4996", -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.
}
configuration { "mingw* or linux or osx" }
configuration { "mingw* or linux* or osx*" }
buildoptions {
"-fno-strict-aliasing", -- glsl-optimizer has bugs if strict aliasing is used.
@ -545,7 +545,7 @@ project "glsl-optimizer"
"-Wshadow", -- glsl-optimizer is full of -Wshadow warnings ignore it.
}
configuration { "osx" }
configuration { "osx*" }
buildoptions {
"-Wno-deprecated-register",
}
@ -641,7 +641,7 @@ project "shaderc"
configuration { "mingw-*" }
targetextension ".exe"
configuration { "osx" }
configuration { "osx*" }
links {
"Cocoa.framework",
}
@ -656,7 +656,7 @@ project "shaderc"
"psapi",
}
configuration { "osx or linux*" }
configuration { "osx* or linux*" }
links {
"pthread",
}

View File

@ -31,7 +31,7 @@ project "texturec"
"psapi",
}
configuration { "osx" }
configuration { "osx*" }
links {
"Cocoa.framework",
}

View File

@ -52,7 +52,7 @@ project ("texturev")
"Xcursor",
}
configuration { "osx" }
configuration { "osx*" }
linkoptions {
"-framework CoreVideo",
"-framework IOKit",
@ -138,7 +138,7 @@ project ("texturev")
"pthread",
}
configuration { "osx" }
configuration { "osx*" }
linkoptions {
"-framework Cocoa",
"-framework Metal",