diff options
Diffstat (limited to 'mkspecs/features/toolchain.prf')
-rw-r--r-- | mkspecs/features/toolchain.prf | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf index ba41598be1..fdf3d1cdd3 100644 --- a/mkspecs/features/toolchain.prf +++ b/mkspecs/features/toolchain.prf @@ -1,7 +1,4 @@ -# In early configure setup; nothing useful to be done here. -isEmpty(QMAKE_CXX): return() - defineReplace(qtMakeExpand) { out = "$$1" for(ever) { @@ -19,7 +16,13 @@ defineTest(qtCompilerErrror) { what = " host" else: \ what = " target" - error("Cannot run$$what compiler '$$1'. Maybe you forgot to setup the environment?") + msg = \ + "Cannot run$$what compiler '$$1'. Output:" \ + "===================" \ + $$2 \ + "===================" \ + "Maybe you forgot to setup the environment?" + error($$join(msg, $$escape_expand(\\n))) } cross_compile:host_build: \ @@ -64,7 +67,7 @@ isEmpty($${target_prefix}.INCDIRS) { cxx_flags += -E -v output = $$system("$$cmd_prefix $$QMAKE_CXX $$qtMakeExpand($$cxx_flags) -xc++ - 2>&1 $$cmd_suffix", lines, ec) - !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX) + !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX, $$output) rim_qcc { for (line, output) { @@ -124,7 +127,7 @@ isEmpty($${target_prefix}.INCDIRS) { # What's more, -print-search-dirs can't be used on clang on Apple because it # won't print all the library paths (only the clang-internal ones). output = $$system("$$cmd_prefix $$QMAKE_CXX -print-search-dirs", lines, ec) - !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX) + !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX, $$output) for (line, output) { contains(line, "^libraries: .*") { @@ -166,14 +169,14 @@ isEmpty($${target_prefix}.INCDIRS) { defineReplace(qtVariablesFromMSVC) { ret = $$system("$$1 -nologo -E $$2 $$system_quote($$PWD/data/macros.cpp) <NUL 2>NUL", lines, ec) - !equals(ec, 0): qtCompilerErrror($$1) + !equals(ec, 0): qtCompilerErrror($$1, $$ret) return($$ret) } defineReplace(qtVariablesFromGCC) { ret = $$system("$$1 -E $$system_quote($$PWD/data/macros.cpp) \ <$$QMAKE_SYSTEM_NULL_DEVICE 2>$$QMAKE_SYSTEM_NULL_DEVICE", lines, ec) - !equals(ec, 0): qtCompilerErrror($$1) + !equals(ec, 0): qtCompilerErrror($$1, $$ret) return($$ret) } |