Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1322

QBS uses bad target when using Clang on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 1.11.0
    • Fix Version/s: None
    • Component/s: Toolchains: Clang/LLVM
    • Labels:
      None

      Description

      I'm trying to compile a QBS project using the new Clang6 compiler with MSVC2017 header/lib support on Windows. I verified that the compiler itself works perfectly, i.e. I can compile, link and run basic C++ hello world applications using stdc++ libs from MSVC2017 if the include and lib paths are set correctly.

      Compiling with QBS fails however, since QBS keeps adding a bad target x86_64-unknown-unknown-unknown parameter to the compile commands for some reason:

      "C:\Program Files\LLVM\bin\clang++.exe" -g -O0 -Wall -Wextra -target x86_64-unknown-unknown-unknown -pipe -fexceptions ......
      

      Compilation works if target is either x86_64-pc-windows-msvc or by simply not setting target and using the compiler default.

      The QBS Profile for Clang was added by using qbs setup-toolchains <llvm-path> clang+.exe. Alternatively (and originally) I used QtCreator, added Clang as a new C+ compiler, chose ABI x86-windows-msvc2017-pe-64bit and set it as the Compiler in a new Qt Kit. In both set ups QBS ends up adding x86_64-unknown-unknown-unknown.

      Correcting the target using cflags doesn't work either because some qbs internal script detects and explicitly prevents this crude attempt of changing "target".

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              kandeler Christian Kandeler
              Reporter:
              pwuertz Peter W├╝rtz
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes