summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/toolchain.prf
Commit message (Collapse)AuthorAgeFilesLines
* configure: during early setup, skip all of default_pre.prfOswald Buddenhagen2017-12-141-3/+0
| | | | | | | | | | ... instead of only toolchain.prf. the license check could go haywire, and everything else that file does is meaningless in configure context anyway. Task-number: QTBUG-63452 Change-Id: I5e31c87fe717fda40978c0317556070637e537e2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* qmake: print compiler output if detection phase failsOswald Buddenhagen2017-12-141-5/+11
| | | | | | | helps enormously with debugging. Change-Id: Ic8876e74a4dbb14006d8b48658eb141a3f0e0fbf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Qmake: Introduce and use QMAKE_{SYSTEM,SHELL}_NULL_DEVICE variable, take 2Orgad Shaneh2017-10-131-12/+7
| | | | | | | | | | SYSTEM is used for system() calls, while SHELL is used in the target Makefiles. Task-number: QTBUG-62985 Change-Id: Ia75d3939c59c98699359421166433e8b4a6ee35e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add support for ICC in toolchain.prfTony Sarajärvi2017-09-291-2/+2
| | | | | | Task-number: QTBUG-62531 Change-Id: Ie15a349c830258058d48c9da18b52b343bdb943a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix conditions in some QMAKE_COMPILER_DEFINES assignmentsRobert Loehning2017-09-151-3/+3
| | | | | | | | | | We obviously should check the variable we're about to get the data from. Amends 1216f596bdb. Change-Id: Ibe87138b9c9aa99837b4fbf3769cd26ca1aaacb9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* make compiler invocation error messages mention host/targetOswald Buddenhagen2017-08-111-8/+14
| | | | | | | | | | | | it's unclear where to look for the error when the message talks about 'g++' when '${CROSS_COMPILE}g++' would have been expected. help it by saying whether it was supposed to be the host or target compiler. this also centralizes the error emissions in a function. Change-Id: I454c6ff7c0e7dd945dcee0de01e2818caeeb7409 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Only try to resolve library paths via linker for Drawin clangTor Arne Vestbø2017-07-081-2/+2
| | | | | | Task-number: QTBUG-61735 Change-Id: Ia8e777928aa0cff44f092968eac14d32501a5d73 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix detection of QMAKE_DEFAULT_LIBDIRS with Clang under LinuxGiuseppe D'Angelo2017-07-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | With 4183475080d334d7d17d02e6ad4eb53c01205c54, Qt fails to build if qmake is unable to detect the compiler's default include and library search paths. Clang on non-Darwin systems was missing working code for the detection. Unlike GCC, Clang on its own does not print the library search paths when called with the -v option. On Darwin, the -Wl,-v option will reach ld64, which will print those paths. However, neither GNU ld nor gold will print anything useful with just -v. GNU ld has a --verbose option that does print some search paths, but those are not the ones used when ld is invoked (via collect2) by GCC or Clang, so it can't be used. To make Clang print its library search paths one can use -print-search-dirs, which however doesn't print include search paths. So amend the existing code in order to make a second call to clang on non-Darwin systems. This second call is used for library path detection, and fixes the build on non-Darwin (tested on Linux). Change-Id: Ic858f908ee1a2e0eb307abb074daee0ded38abd5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* fix QMAKE_DEFAULT_INCDIRS detection with Xcode targeting uikit platformsOswald Buddenhagen2017-07-021-1/+6
| | | | | | | | | | | | uikit/sdk.prf replaces QMAKE_MAC_SDK_PATH with a make expansion of that variable, which of course does not work when we use the contents directly. amends 6d5489f5d. Task-number: QTBUG-61690 Change-Id: Id77dff8ee7d737dd35f74cc7d39faaa50b4b1ab9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add query of default include/library paths for QNXJames McDonnell2017-06-291-26/+55
| | | | | Change-Id: Iafc5a573a2ddb277d2a786cb6b48521985defe44 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Error out when compiler is unable to produce default include/library pathsTor Arne Vestbø2017-06-251-0/+3
| | | | | | | | Adds a bit of extra safeguard to ensure we don't accidentally fall into the generic unix isEmpty(QMAKE_DEFAULT_{INC,LIB}DIRS) code-paths. Change-Id: Id760b32cd29cb2b9db1390c174e1637e2dddaabc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* complain when toolchain.prf fails to run the compilerOswald Buddenhagen2017-06-121-3/+11
| | | | | | Task-number: QTBUG-60059 Change-Id: I2babe8aaf7cdf5912686f679d14bebc82231a846 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* make qconfig.pri export QT_<compiler>_VERSION variables againOswald Buddenhagen2017-06-121-19/+11
| | | | | | | | | | | | | ... and rename those determined by toolchain.prf to QMAKE_* (this was already the case for the newly introduced msvc and icc variables). this restores the ability for user projects to query the toolchain qt itself was built with, which is necessary for compatibility checks. in fact, we may do such validation in toolchain.prf itself at a later point. Change-Id: I35f4c393c5e4e0fe987c0844714b7a8f8687c24e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Pick up default library paths for clangTor Arne Vestbø2017-06-091-2/+19
| | | | | | | | | We need to actually run the linker, otherwise clang will just run the preprocessing step as we asked for. We build as a shared library to not have to provide a main() function. Change-Id: Ied34757bb5c43a862bf2d9778340c497b93d572f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Detect the (stated) C++ standard edition at build timeThiago Macieira2017-03-311-0/+1
| | | | | | | | | | | | | | | | | The configure-time detection (cxx11default) isn't enough if the compiler can be changed. This is especially necessary if Qt is compiled with a compiler that defaults to >= C++11 (e.g., GCC 6) and then the user selects a compiler another compiler (e.g., Clang) via -spec option. In that case, we'd miss adding the -std=c++11 or -std=gnu++11 option to the command-line, causing the compilation to fail. As a nice side-effect, even moc without moc_predefs.h will now get the __cplusplus setting. Task-number: QTBUG-58321 Change-Id: I74966ed02f674a7295f8fffd14a8be35da9640e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Apple: fix QMAKE_DEFAULT_INCDIRS so compiler invocations use the sysrootJake Petroules2017-01-261-1/+12
| | | | | | | | | | | | | | The compiler command line used to populate QMAKE_DEFAULT_INCDIRS must include the sysroot in order to generate the correct paths list. This fixes a regression introduced in afd8263 which in turn attempted to fix an earlier regression making it impossible to override the deployment target in user project files. Task-number: QTBUG-58325 Change-Id: I93e6b7ef90b2744dd2f03c77da31c692cb194976 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* don't separate host and target toolchain when not x-buildingOswald Buddenhagen2017-01-201-1/+1
| | | | | | | | there isn't a point to determining the values separately if they are actually the same things. Change-Id: I74cd2bf39e96d559630709559602c234c38b0c47 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* determine QMAKE_DEFAULT_{INC,LIB}DIRS separately for host and targetOswald Buddenhagen2017-01-201-8/+13
| | | | | | | | | | | | | | | | | | note that in principle this leaves room for a race condition, as the first project to determine the host config is not going to be the top-level one. in qtbase and qtdeclarative, this is naturally serialized via the common bootstrapped libraries (bootstrap resp. qmldevtools). activeqt, qt3d, qtscxml, and qtwayland all build only one bootstrapped tool each. qtwebengine makes a fake host build to create files for gyp/gn; the convert_dict tool is declared a host tool, but isn't actually built when x-building anyway, and even if, it's serialized on the former. qttools needs explicit serialization, though. no other host builds exist within qt as of now. Task-number: QTBUG-58126 Change-Id: I81a02a2d98f2bfe5d6aaa51119d5e7919549f119 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* prevent configure from putting garbage into .qmake.stashOswald Buddenhagen2017-01-201-0/+2
| | | | | | | | | | | | | in cross-builds, toolchain.prf was loaded before CROSS_COMPILE was set up, leading to caching of possibly nonsensical values. this change also necessitated that msvc-version.conf is loaded only when toolchain.prf is, which is best done by loading the former from within the latter. that seems quite appropriate in the first place. Change-Id: I62577e827a75e335e03df016bd1aa1932643fd6c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* determine msvc compat version in clang spec dynamicallyOswald Buddenhagen2016-12-231-1/+20
| | | | | | | | | instead of hardcoding the compat version in the spec, run cl.exe (which needs to be around anyway) to figure out what version to emulate. Change-Id: I6eae97fe9a78f8e340ecdabcdc0d48738497c6d2 Started-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* determine compiler version at build time, not in configureOswald Buddenhagen2016-12-231-0/+76
| | | | | | | | | | | | | | this makes it consistent with the determination of the default include/library paths. this makes sense, as it's possible to switch the sdk/toolchain after building qt (within reason). a side effect of this change is that for compilers which emulate other compilers, both the real and the emulated version are now made available. Change-Id: Icfcc672c0d2e3d1b5e622993c366063d70ad327c Started-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* move qdevice.pri creation to qmake-based configure systemOswald Buddenhagen2016-12-131-0/+3
| | | | | | | Change-Id: I06540c3b6d98303bd9a218feedfb529993477ed6 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* quote regexpsOswald Buddenhagen2016-10-201-2/+2
| | | | | | | | | | | the parens aren't matched, so the syntax was bogus. amends 32a3413b13. Task-number: QTBUG-56580 Change-Id: Ic00ba50844b822c7e4524ae81fbb1bc112a158a9 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* make-expand cflags before passing them to $$system()Oswald Buddenhagen2016-10-191-1/+11
| | | | | | | | mac/sdk.prf puts some indirections into them. Task-number: QTBUG-56580 Change-Id: I8ffd2438309702466edd3ad5c51284c7cab4fda9 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* fix QMAKE_DEFAULT_*DIRS resolution with apple SDK, take 2Oswald Buddenhagen2016-10-161-0/+47
the code got factored out to an own toolchain.prf file, which is load()ed from default_pre.prf, so no change at first. however, on mac, we shadow toolchain.prf, and make it load() sdk.prf first. a side effect, it has become harder to disable the use of an sdk altogether: putting CONFIG-=sdk into a project file or the qmake command line has no effect now. instead, it's possible to put it into .qmake.{conf,cache}. to make it simpler again, it's conceivable to finally add qmake -pre, which would allow setting variables before default_pre.prf is executed. take 2: there was nothing wrong with the original patch, but in 5.8, CONFIG+=simulator_and_device moved from qconfig.pri to various prf files that would do it according to the simulator_and_device configure feature, which would be way too late for the "pulled ahead" sdk.prf loading. as simulator_and_device is now gone entirely, it is safe to re-apply this patch (mostly) as-is. Task-number: QTBUG-56144 Change-Id: I6cf484982eaed8af39f7a539c60f5a087a299914 Reviewed-by: Jake Petroules <jake.petroules@qt.io>