[LLVMbugs] [Bug 23313] New: Project LTO does not build on Windows if the build path has spaces in it.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 22 06:21:50 PDT 2015


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: unassignedbugs at nondot.org
          Reporter: jujjyl at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150422/762625b3/attachment.html>


More information about the llvm-bugs mailing list