fetchDependencies supports iOS simulator fat external library builds.
fetchDependencies supports options for specifying which platform options to build for. Fix SPIRV-Tools builds to avoid code stripping warnings.
This commit is contained in:
parent
491698e49d
commit
50828dde93
@ -3833,7 +3833,6 @@
|
|||||||
A972A80D21CECBBF0013AB25 /* Debug */ = {
|
A972A80D21CECBBF0013AB25 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
DEPLOYMENT_POSTPROCESSING = YES;
|
|
||||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -3850,7 +3849,6 @@
|
|||||||
A972A80E21CECBBF0013AB25 /* Release */ = {
|
A972A80E21CECBBF0013AB25 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
DEPLOYMENT_POSTPROCESSING = YES;
|
|
||||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -3867,7 +3865,6 @@
|
|||||||
A972A82121CECBE90013AB25 /* Debug */ = {
|
A972A82121CECBE90013AB25 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
DEPLOYMENT_POSTPROCESSING = YES;
|
|
||||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -3884,7 +3881,6 @@
|
|||||||
A972A82221CECBE90013AB25 /* Release */ = {
|
A972A82221CECBE90013AB25 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
DEPLOYMENT_POSTPROCESSING = YES;
|
|
||||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
|
||||||
HEADER_SEARCH_PATHS = (
|
HEADER_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
14
README.md
14
README.md
@ -110,7 +110,19 @@ on which **MoltenVK** relies:
|
|||||||
3. Retrieve and build the external libraries:
|
3. Retrieve and build the external libraries:
|
||||||
|
|
||||||
cd MoltenVK
|
cd MoltenVK
|
||||||
./fetchDependencies
|
./fetchDependencies [platform...]
|
||||||
|
|
||||||
|
When running the `fetchDependencies` script, you must specify one or more platforms
|
||||||
|
for which to build the external libraries. The platform choices include:
|
||||||
|
|
||||||
|
--ios --ios-fat --macos --all
|
||||||
|
|
||||||
|
You can specify multiple of these selections. The `--ios-fat` selection builds one binary for
|
||||||
|
each external library, with each binary including code for both *iOS* and *iOS Simulator* platforms.
|
||||||
|
The `--all` selection is the same as selecting `--ios-fat --macos` and results in two binaries
|
||||||
|
for each external library: a *fat iOS* binary, and a *macOS* binary. The more selections you include,
|
||||||
|
the longer the build time.
|
||||||
|
|
||||||
|
|
||||||
For more information about the external open-source libraries used by **MoltenVK**,
|
For more information about the external open-source libraries used by **MoltenVK**,
|
||||||
see the [`ExternalRevisions/README.md`](ExternalRevisions/README.md) document.
|
see the [`ExternalRevisions/README.md`](ExternalRevisions/README.md) document.
|
||||||
|
@ -4,9 +4,27 @@
|
|||||||
#
|
#
|
||||||
# fetchDependencies - Retrieves the correct versions of all dependencies
|
# fetchDependencies - Retrieves the correct versions of all dependencies
|
||||||
#
|
#
|
||||||
# macOS usage: ./fetchDependencies [-v] [--debug] [--build-spirv-tools]
|
# macOS usage: ./fetchDependencies [--ios] [--ios-fat] [--macos] [--all]
|
||||||
|
# [-v] [--debug] [--build-spirv-tools]
|
||||||
# [--v-headers-root path] [--spirv-cross-root path] [--glslang-root path]
|
# [--v-headers-root path] [--spirv-cross-root path] [--glslang-root path]
|
||||||
#
|
#
|
||||||
|
# --ios
|
||||||
|
# Build the external libraries for the iOS platform.
|
||||||
|
#
|
||||||
|
# --ios-fat
|
||||||
|
# Build a single binary for each external library, each containing code
|
||||||
|
# for both iOS and iOS Simulator platforms.
|
||||||
|
#
|
||||||
|
# --macos
|
||||||
|
# Build the external libraries for the macOS platform.
|
||||||
|
#
|
||||||
|
# --all
|
||||||
|
# Equivalent to specifying [--ios-fat --macos]. Results in two binaries for
|
||||||
|
# each external library: one for the iOS and iOS Simulator platforms, and
|
||||||
|
# another for the macOS platform.
|
||||||
|
#
|
||||||
|
# Multiple platform options may be specified.
|
||||||
|
#
|
||||||
# --debug
|
# --debug
|
||||||
# Build the external libraries in Debug mode, which may be useful when debugging
|
# Build the external libraries in Debug mode, which may be useful when debugging
|
||||||
# and tracing calls into those libraries.
|
# and tracing calls into those libraries.
|
||||||
@ -41,7 +59,11 @@ set -e
|
|||||||
|
|
||||||
# ----------------- Functions -------------------
|
# ----------------- Functions -------------------
|
||||||
|
|
||||||
XC_SCHEME_SFX=""
|
BLD_IOS=""
|
||||||
|
BLD_IOS_SIM=""
|
||||||
|
BLD_MACOS=""
|
||||||
|
BLD_SPECIFIED=""
|
||||||
|
XC_CONFIG="Release"
|
||||||
XC_BUILD_VERBOSITY="-quiet"
|
XC_BUILD_VERBOSITY="-quiet"
|
||||||
V_HEADERS_ROOT=""
|
V_HEADERS_ROOT=""
|
||||||
SPIRV_CROSS_ROOT=""
|
SPIRV_CROSS_ROOT=""
|
||||||
@ -50,8 +72,31 @@ BLD_SPV_TLS=""
|
|||||||
|
|
||||||
while (( "$#" )); do
|
while (( "$#" )); do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--ios)
|
||||||
|
BLD_IOS="Y"
|
||||||
|
BLD_SPECIFIED="Y"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--ios-fat)
|
||||||
|
BLD_IOS="Y"
|
||||||
|
BLD_IOS_SIM="Y"
|
||||||
|
BLD_SPECIFIED="Y"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--macos)
|
||||||
|
BLD_MACOS="Y"
|
||||||
|
BLD_SPECIFIED="Y"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
--all)
|
||||||
|
BLD_IOS="Y"
|
||||||
|
BLD_IOS_SIM="Y"
|
||||||
|
BLD_MACOS="Y"
|
||||||
|
BLD_SPECIFIED="Y"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
--debug)
|
--debug)
|
||||||
XC_SCHEME_SFX=" (Debug)"
|
XC_CONFIG="Debug"
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-v)
|
-v)
|
||||||
@ -85,6 +130,13 @@ while (( "$#" )); do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# if no platform was specified, print usage message and exit
|
||||||
|
if [ "$BLD_SPECIFIED" = "" ]; then
|
||||||
|
echo ERROR: You did not specify a platform to build.
|
||||||
|
echo Include one or more of the following platform options: --ios --ios-fat --macos --all
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Update a repository. If it exists, fetch it; if not, clone it.
|
# Update a repository. If it exists, fetch it; if not, clone it.
|
||||||
# $1 repo name
|
# $1 repo name
|
||||||
# $2 repo url
|
# $2 repo url
|
||||||
@ -286,17 +338,40 @@ echo
|
|||||||
echo ========== Building dependency libraries quietly. Please be patient on first build. ==========
|
echo ========== Building dependency libraries quietly. Please be patient on first build. ==========
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# Build an Xcode scheme
|
||||||
|
function build() {
|
||||||
|
echo Building external libraries for ${XC_PLTFM}
|
||||||
|
xcodebuild \
|
||||||
|
-project "${XC_PROJ}" \
|
||||||
|
-scheme "${XC_SCHEME}" \
|
||||||
|
-destination "generic/platform=${XC_PLTFM}" \
|
||||||
|
-configuration "${XC_CONFIG}" \
|
||||||
|
-derivedDataPath "${XC_DD_PATH}" \
|
||||||
|
${XC_BUILD_VERBOSITY} \
|
||||||
|
build
|
||||||
|
}
|
||||||
|
|
||||||
EXT_DEPS=ExternalDependencies
|
EXT_DEPS=ExternalDependencies
|
||||||
XC_PROJ="${EXT_DEPS}.xcodeproj"
|
XC_PROJ="${EXT_DEPS}.xcodeproj"
|
||||||
XC_SCHEME="${EXT_DEPS}${XC_SCHEME_SFX}"
|
|
||||||
XC_DD_PATH="${EXT_DIR}/build"
|
XC_DD_PATH="${EXT_DIR}/build"
|
||||||
|
|
||||||
xcodebuild \
|
if [ "$BLD_IOS" != "" ]; then
|
||||||
-project "${XC_PROJ}" \
|
XC_SCHEME="${EXT_DEPS}-iOS"
|
||||||
-scheme "${XC_SCHEME}" \
|
XC_PLTFM="iOS"
|
||||||
-derivedDataPath "${XC_DD_PATH}" \
|
|
||||||
${XC_BUILD_VERBOSITY} \
|
|
||||||
build
|
build
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BLD_IOS_SIM" != "" ]; then
|
||||||
|
XC_SCHEME="${EXT_DEPS}-iOS"
|
||||||
|
XC_PLTFM="iOS Simulator"
|
||||||
|
build
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BLD_MACOS" != "" ]; then
|
||||||
|
XC_SCHEME="${EXT_DEPS}-macOS"
|
||||||
|
XC_PLTFM="macOS"
|
||||||
|
build
|
||||||
|
fi
|
||||||
|
|
||||||
echo ========== Done! ==========
|
echo ========== Done! ==========
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user