diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-02-21 12:45:06 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-02-21 15:29:06 +0100 |
commit | 41210b90c8d56c8726dd7d277a73b8e5248f32cf (patch) | |
tree | bc5cc39131f4f9f82736bf5cb1b68a4881e53700 /share/qbs/modules/cpp/msvc.js | |
parent | 760b9c319dc156b76d7a6af0d27fd1b7242cd9fd (diff) |
MSVC: fix incremental linking
Task-number: QBS-214
Change-Id: I250b4169733a91df7dac3a8e8cfc95cf42793b3d
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'share/qbs/modules/cpp/msvc.js')
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index a32694fe9..ae171b055 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -120,11 +120,17 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, args.push('/SUBSYSTEM:WINDOWS'); } - var manifestFileName + var linkerOutputNativeFilePath; + var manifestFileName; if (generateManifestFiles) { - manifestFileName = FileInfo.toWindowsSeparators(primaryOutput.fileName) - manifestFileName += '.intermediate.manifest' + linkerOutputNativeFilePath + = FileInfo.toWindowsSeparators( + FileInfo.path(primaryOutput.fileName) + "/intermediate." + + FileInfo.fileName(primaryOutput.fileName)); + manifestFileName = linkerOutputNativeFilePath + ".manifest"; args.push('/MANIFEST', '/MANIFESTFILE:' + manifestFileName) + } else { + linkerOutputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.fileName); } var allInputs = inputs.obj.concat(inputs.staticlibrary || []) @@ -147,8 +153,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, args.push(dynamicLibrary) } - var nativeOutputFileName = FileInfo.toWindowsSeparators(primaryOutput.fileName) - args.push('/OUT:' + nativeOutputFileName) + args.push('/OUT:' + linkerOutputNativeFilePath) for (i in libraryPaths) { args.push('/LIBPATH:' + FileInfo.toWindowsSeparators(libraryPaths[i])) } @@ -169,10 +174,13 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, commands.push(cmd); if (generateManifestFiles) { - // embed the generated manifest files + var outputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.fileName); + cmd = new Command("cmd.exe", ["/c", "copy", linkerOutputNativeFilePath, + outputNativeFilePath, ">NUL"]); + commands.push(cmd); args = [ '/nologo', '/manifest', manifestFileName, - '/outputresource:' + nativeOutputFileName + ';1' + '/outputresource:' + outputNativeFilePath + ';1' ] cmd = new Command("mt.exe", args) cmd.description = 'embedding manifest into ' + FileInfo.fileName(primaryOutput.fileName) |