llvm-project/compiler-rt/cmake
Etienne Bergeron 3df2879232 [compiler-rt] Fix multi-configuration output paths
Summary:
When using a multi-configuration build (i.e. MSVC) the output path where
libraries are dropped is incorrect.

Example:
```
C:\src\llvm\examples>d:\src\llvm\build\Release\bin\clang-cl.exe -fsanitize=address test.cc
LINK : fatal error LNK1181: cannot open input file 'd:\src\llvm\build\Release\bin\..\lib\clang\3.9.0\lib\windows\clang_rt.asan-i386.lib'
```

The dropped executable path contains the configuration 'Release':
```
'd:\src\llvm\build\Release\bin\..\lib\clang\3.9.0\lib\windows\Release\clang_rt.asan-i386.lib'
```


The variable 'RUNTIME_OUTPUT_DIRECTORY' is used to specify the output directory.
But CMAKE is appending the current configuration (i.e. Debug, Release).

see: https://cmake.org/cmake/help/v3.0/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html
```
"Multi-configuration generators (VS, Xcode) append a per-configuration subdirectory to the specified directory."
```

To avoid this problem, the configuration specific variable must be set:
'RUNTIME_OUTPUT_DIRECTORY_DEBUG', 'RUNTIME_OUTPUT_DIRECTORY_RELEASE', and so on.

Reviewers: ddunbar, chapuni, rnk

Subscribers: kubabrecka, llvm-commits

Differential Revision: http://reviews.llvm.org/D20261

llvm-svn: 269658
2016-05-16 14:58:07 +00:00
..
Modules [compiler-rt] Fix multi-configuration output paths 2016-05-16 14:58:07 +00:00
caches [CMake] Updating Apple CMake cache file 2016-04-28 18:24:29 +00:00
base-config-ix.cmake [CMake] Support platform building builtins without a full toolchain 2016-05-09 21:45:52 +00:00
builtin-config-ix.cmake [CMake] Support platform building builtins without a full toolchain 2016-05-09 21:45:52 +00:00
config-ix.cmake Revert "[MSan] Enable on PowerPC64." 2016-05-14 02:17:38 +00:00