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

Non-native (i.e. ARM) MSVC compilers do not work if toolchainInstallPath is set

    XMLWordPrintable

Details

    Description

      Only the Hostx86\x86 and Hostx64\x64 directories include dependent DLLs for the respective compilers. The cl.exe's from the other subdirectories of Hostx86 and Hostx64 are supposed to have the host-native compiler directory in PATH in order to find dependent DLLs.

      If an explicit toolchainInstallPath is set (such as is the case with Qt Creator MSVC profiles), then running cl.exe will fail with "Process crashed" (really, STATUS_DLL_NOT_FOUND) because cl.exe from %VCINSTALLDIR%\Tools\MSVC\14.10.25017\bin\Hostx86\arm includes relatively few DLLs and relies on the ones from %VCINSTALLDIR%\Tools\MSVC\14.10.25017\bin\Hostx86\x86 being present in the PATH (as the vcvars*.bat script sets up).

      Effectively this means that only the ARM compiler is broken because it's the only target for which only cross-compilers are available (meaning dependent DLLs do not exist in the same directory), and we always pick the native compilers where possible.

      Setting an explicit toolchainInstallPath is supposed to work. Presumably we should add the corresponding host-native compiler's directory to the PATH for the non-native compilers.

      Logic could go something like this: if the path of cl.exe ("X") ends with "Host[x86|x64]
      [x86|x64|arm|arm64]" and the first architecture is not equal to the second, add ("X") to the PATH, with the second architecture replaced by the first.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes