Some small improvements to the build_tools
This commit is contained in:
parent
3e417a6607
commit
51e7cb6d39
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Detects OS we're compiling on and outputs a file specified by the first
|
# Detects OS we're compiling on and outputs a file specified by the first
|
||||||
# argument, which in turn gets read while processing Makefile.
|
# argument, which in turn gets read while processing Makefile.
|
||||||
@ -66,11 +66,19 @@ rm -f "$OUTPUT"
|
|||||||
touch "$OUTPUT"
|
touch "$OUTPUT"
|
||||||
|
|
||||||
if test -z "$CC"; then
|
if test -z "$CC"; then
|
||||||
CC=cc
|
if [ -x "$(command -v clang)" ]; then
|
||||||
|
CC=clang
|
||||||
|
else
|
||||||
|
CC=cc
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$CXX"; then
|
if test -z "$CXX"; then
|
||||||
CXX=g++
|
if [ -x "$(command -v clang++)" ]; then
|
||||||
|
CXX=clang++
|
||||||
|
else
|
||||||
|
CXX=g++
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
@ -87,7 +95,7 @@ if test -z "$CLANG_SCAN_BUILD"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$CLANG_ANALYZER"; then
|
if test -z "$CLANG_ANALYZER"; then
|
||||||
CLANG_ANALYZER=$(which clang++ 2> /dev/null)
|
CLANG_ANALYZER=$(command -v clang++ 2> /dev/null)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$FIND"; then
|
if test -z "$FIND"; then
|
||||||
@ -498,9 +506,9 @@ if test -z "$PORTABLE"; then
|
|||||||
elif test -n "`echo $TARGET_ARCHITECTURE | grep ^arm`"; then
|
elif test -n "`echo $TARGET_ARCHITECTURE | grep ^arm`"; then
|
||||||
# TODO: Handle this with approprite options.
|
# TODO: Handle this with approprite options.
|
||||||
COMMON_FLAGS="$COMMON_FLAGS"
|
COMMON_FLAGS="$COMMON_FLAGS"
|
||||||
elif [ "$TARGET_OS" == IOS ]; then
|
elif [ "$TARGET_OS" == "IOS" ]; then
|
||||||
COMMON_FLAGS="$COMMON_FLAGS"
|
COMMON_FLAGS="$COMMON_FLAGS"
|
||||||
elif [ "$TARGET_OS" != AIX ] && [ "$TARGET_OS" != SunOS ]; then
|
elif [ "$TARGET_OS" != "AIX" ] && [ "$TARGET_OS" != "SunOS" ]; then
|
||||||
COMMON_FLAGS="$COMMON_FLAGS -march=native "
|
COMMON_FLAGS="$COMMON_FLAGS -march=native "
|
||||||
elif test "$USE_SSE"; then
|
elif test "$USE_SSE"; then
|
||||||
COMMON_FLAGS="$COMMON_FLAGS -msse4.2 -mpclmul"
|
COMMON_FLAGS="$COMMON_FLAGS -msse4.2 -mpclmul"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#/usr/bin/env bash
|
||||||
if [ "$#" = "0" ]; then
|
if [ "$#" = "0" ]; then
|
||||||
echo "Usage: $0 major|minor|patch|full"
|
echo "Usage: $0 major|minor|patch|full"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user