nuke configure -host-option

in its current form, it was introduced only in 5.7, mostly as a side
effect of -external-hostbindir (which is now handled differently).
it only ever worked for the macOS and MinGW specs, as a side effect of
them supporting -sdk and -device-option (for good reasons), and was
supported only by the unix configure. it's not believed to be really
useful and complicates matters somewhat, so get rid of it again.

should it ever become actually relevant, it can be re-introduced
properly, probably along with a -host-sdk option for macOS.

Change-Id: Ib078469ea39deb821c7b6a8c67fda9e1a95fedf5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Oswald Buddenhagen 2016-11-24 17:36:38 +01:00
parent e58eb3d6f9
commit 42196f4061
5 changed files with 11 additions and 48 deletions

View File

@ -85,7 +85,6 @@ Build options:
-framework ........... Build Qt framework bundles [yes] (Apple only) -framework ........... Build Qt framework bundles [yes] (Apple only)
-platform <target> ... Select host mkspec [detected] -platform <target> ... Select host mkspec [detected]
-host-option <key=value> ..... Add option for the host mkspec
-xplatform <target> .. Select target mkspec when cross-compiling [PLATFORM] -xplatform <target> .. Select target mkspec when cross-compiling [PLATFORM]
-device <name> ....... Cross-compile for device <name> -device <name> ....... Cross-compile for device <name>
-device-option <key=value> ... Add option for the device mkspec -device-option <key=value> ... Add option for the device mkspec

42
configure vendored
View File

@ -123,10 +123,7 @@ IFS=$SAVED_IFS
# initialize global variables # initialize global variables
DEVICE_VARS_FILE=.device.vars DEVICE_VARS_FILE=.device.vars
HOST_VARS_FILE=.host.vars
:> "$DEVICE_VARS_FILE" :> "$DEVICE_VARS_FILE"
:> "$HOST_VARS_FILE"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# utility functions # utility functions
@ -169,6 +166,9 @@ expandQMakeConf()
;; ;;
*load\(device_config\)*) *load\(device_config\)*)
conf_file="$2" conf_file="$2"
if [ -z "$conf_file" ]; then
continue
fi
if [ ! -f "$conf_file" ]; then if [ ! -f "$conf_file" ]; then
echo "WARNING: Unable to find file $conf_file" >&2 echo "WARNING: Unable to find file $conf_file" >&2
continue continue
@ -312,7 +312,7 @@ macSDKify()
getQMakeConf() getQMakeConf()
{ {
if [ -z "$specvals" ]; then if [ -z "$specvals" ]; then
specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" "$HOST_VARS_FILE" | extractQMakeVariables` specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" | extractQMakeVariables`
if [ "$BUILD_ON_MAC" = "yes" ]; then specvals=$(macSDKify "$specvals"); fi if [ "$BUILD_ON_MAC" = "yes" ]; then specvals=$(macSDKify "$specvals"); fi
fi fi
getSingleQMakeVariable "$1" "$specvals" getSingleQMakeVariable "$1" "$specvals"
@ -361,23 +361,6 @@ resolveDeviceMkspec()
fi fi
} }
#-------------------------------------------------------------------------------
# Host options
#-------------------------------------------------------------------------------
HostVar()
{
case "$1" in
set)
eq="="
;;
*)
echo >&2 "BUG: wrong command to HostVar: $1"
;;
esac
echo "$2" "$eq" "$3" >> "$HOST_VARS_FILE"
}
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# operating system detection # operating system detection
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -559,7 +542,6 @@ while [ "$#" -gt 0 ]; do
-xplatform| \ -xplatform| \
-device| \ -device| \
-device-option| \ -device-option| \
-host-option| \
-sdk| \ -sdk| \
-android-sdk| \ -android-sdk| \
-android-ndk| \ -android-ndk| \
@ -697,11 +679,6 @@ while [ "$#" -gt 0 ]; do
DEV_VAL=`echo $VAL | cut -d '=' -f 2-` DEV_VAL=`echo $VAL | cut -d '=' -f 2-`
DeviceVar set $DEV_VAR "$DEV_VAL" DeviceVar set $DEV_VAR "$DEV_VAL"
;; ;;
host-option)
HOST_VAR=`echo $VAL | cut -d '=' -f 1`
HOST_VAL=`echo $VAL | cut -d '=' -f 2-`
HostVar set $HOST_VAR "$HOST_VAL"
;;
optimized-qmake|optimized-tools) optimized-qmake|optimized-tools)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_RELEASE_TOOLS="$VAL" CFG_RELEASE_TOOLS="$VAL"
@ -1580,17 +1557,6 @@ else
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE" DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
fi fi
#-------------------------------------------------------------------------------
# write out host config.
#-------------------------------------------------------------------------------
HOST_VARS_OUTFILE="$outpath/mkspecs/qhost.pri"
if cmp -s "$HOST_VARS_FILE" "$HOST_VARS_OUTFILE"; then
rm -f "$HOST_VARS_FILE"
else
mv -f $HOST_VARS_FILE "$HOST_VARS_OUTFILE"
HOST_VARS_FILE="$HOST_VARS_OUTFILE"
fi
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# run configure tests # run configure tests
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------

View File

@ -81,7 +81,6 @@
"gnumake": { "type": "boolean", "name": "GNUmake" }, "gnumake": { "type": "boolean", "name": "GNUmake" },
"gui": "boolean", "gui": "boolean",
"headersclean": "boolean", "headersclean": "boolean",
"host-option": "string",
"incredibuild-xge": { "type": "boolean", "name": "incredibuild_xge" }, "incredibuild-xge": { "type": "boolean", "name": "incredibuild_xge" },
"libudev": "boolean", "libudev": "boolean",
"ltcg": "boolean", "ltcg": "boolean",

View File

@ -1,12 +1,12 @@
# This file is loaded by some qmakespecs to get early configuration data. # This file is loaded by some qmakespecs to get early configuration data.
host_build: \ # Some of these qmakespecs can be used also in host mode, but they are not
PRI_FILE_NAME = qhost.pri # supposed to be influenced by -device-option then.
else: \ host_build: return()
PRI_FILE_NAME = qdevice.pri
DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/$$PRI_FILE_NAME DEVICE_PRI = $$[QT_HOST_DATA/get]/mkspecs/qdevice.pri
exists($$DEVICE_PRI):include($$DEVICE_PRI) exists($$DEVICE_PRI):include($$DEVICE_PRI)
unset(DEVICE_PRI) unset(DEVICE_PRI)
# this variable can be persisted via qmake -set CROSS_COMPILE /foo # this variable can be persisted via qmake -set CROSS_COMPILE /foo
!host_build:isEmpty(CROSS_COMPILE): CROSS_COMPILE = $$[CROSS_COMPILE] isEmpty(CROSS_COMPILE): CROSS_COMPILE = $$[CROSS_COMPILE]

View File

@ -28,7 +28,6 @@ QMAKE_DISTCLEAN += \
config.tests/.qmake.cache \ config.tests/.qmake.cache \
mkspecs/qconfig.pri \ mkspecs/qconfig.pri \
mkspecs/qdevice.pri \ mkspecs/qdevice.pri \
mkspecs/qhost.pri \
mkspecs/qmodule.pri \ mkspecs/qmodule.pri \
src/corelib/global/qconfig.h \ src/corelib/global/qconfig.h \
src/corelib/global/qconfig_p.h \ src/corelib/global/qconfig_p.h \
@ -79,7 +78,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) {
mkspecs.path = $$[QT_HOST_DATA]/mkspecs mkspecs.path = $$[QT_HOST_DATA]/mkspecs
mkspecs.files = \ mkspecs.files = \
$$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri \ $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri \
$$OUT_PWD/mkspecs/qdevice.pri $$OUT_PWD/mkspecs/qhost.pri \ $$OUT_PWD/mkspecs/qdevice.pri \
$$files($$PWD/mkspecs/*) $$files($$PWD/mkspecs/*)
mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst
INSTALLS += mkspecs INSTALLS += mkspecs