Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

set __CrossBuild in src/Native/build-native.sh automatically #10522

Merged
merged 4 commits into from
Aug 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/Native/build-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,27 @@ while :; do
shift
done

# Set cross build
CPUName=$(uname -p)
# Some Linux platforms report unknown for platform, but the arch for machine.
if [ $CPUName == "unknown" ]; then
CPUName=$(uname -m)
fi
case $CPUName in
i686)
if [ $__BuildArch != x86 ]; then
__CrossBuild=1
echo "Set CrossBuild for $__BuildArch build"
fi
;;
x86_64)
if [ $__BuildArch != x64 ]; then
__CrossBuild=1
echo "Set CrossBuild for $__BuildArch build"
fi
;;
esac

# Set the remaining variables based upon the determined build configuration
__IntermediatesDir="$__rootbinpath/obj/$__BuildOS.$__BuildArch.$__BuildType/Native"
__BinDir="$__rootbinpath/$__BuildOS.$__BuildArch.$__BuildType/Native"
Expand Down