https://llvm.org/bugs/show_bug.cgi?id=23313
Bug ID: 23313
Summary: Project LTO does not build on Windows if the build
path has spaces in it.
Product: Build scripts
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: cmake
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 14240
--> https://llvm.org/bugs/attachment.cgi?id=14240&action=edit
patch to fix build when build path has spaces in it.
STR:
Clone LLVM+Clang to a path that has spaces in it, and do a cmake build with
Visual Studio 2013 to a directory that has spaces in it.
Observed:
When building LLVM in VS2013, it will fail with the following error:
1>------ Build started: Project: LTO, Configuration: RelWithDebInfo x64 ------
1> LTODisassembler.cpp
1> lto.cpp
1>LINK : fatal error LNK1104: cannot open file
'sdk/emsdk/clang/fastcomp/build_incoming_vs2013_64/tools/lto/LTO.def'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
In this case, LLVM build path was located in C:/code/em
sdk/emsdk/clang/fastcomp/build_incoming_vs2013_64/.
Looking at the generated VS project closer, and the CMakeLists.txt, this can be
fixed by adding quotes in cmake/modules/AddLLVM.cmake:
- set(export_file_linker_flag "/DEF:${export_file_linker_flag}")
+ set(export_file_linker_flag "/DEF:\"${export_file_linker_flag}\"")
after which the build passes ok. Attached is a patch to illustrate the fix.
This bug was originally reported in Emscripten SDK bug tracker:
https://github.com/kripken/emscripten/issues/3382 .
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs