Skip to content

Commit bb663aa

Browse files
author
Jason Mittertreiner
committed
Rename llbuild.dll to libllbuild.dll on Windows
Cl by default produces .pdb and .ilk files by simply substituting the extension of the desired target. This produces conflicts between the debug files for llbuild.exe and llbuild.dll. This changes llbuild.dll to be libllbuild.dll to avoid the problem.
1 parent 06a2553 commit bb663aa

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

products/libllbuild/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ set(DEPENDENCIES
99
llvmSupport
1010
sqlite3)
1111

12+
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
13+
set(LIBLLBUILD_NAME libllbuild)
14+
else()
15+
set(LIBLLBUILD_NAME llbuild)
16+
endif()
17+
1218
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
1319
list(APPEND DEPENDENCIES curses)
1420
endif()
1521

1622
add_llbuild_library(libllbuild
1723
${SOURCES}
1824
SHARED
19-
OUTPUT_NAME llbuild)
25+
OUTPUT_NAME ${LIBLLBUILD_NAME})
2026

2127
set_property(TARGET libllbuild PROPERTY MACOSX_RPATH ON)
2228

tests/Examples/buildsystem-capi.llbuild

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Check that the BuildSystem C API example builds and runs correctly.
22
#
3-
# RUN: cc -o %t.exe %{srcroot}/examples/c-api/buildsystem/main.c -I %{srcroot}/products/libllbuild/include -lllbuild -L %{llbuild-lib-dir} -Werror
3+
# RUN: cc -o %t.exe %{srcroot}/examples/c-api/buildsystem/main.c -I %{srcroot}/products/libllbuild/include -l%{libllbuild} -L %{llbuild-lib-dir} -Werror
44
# RUN: env LD_LIBRARY_PATH=%{llbuild-lib-dir} %t.exe %s > %t.out
55
# RUN: %{FileCheck} %s --input-file %t.out
66
#

tests/lit.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ config.substitutions.append( ('%{llbuild-tools-dir}', llbuild_tools_dir) )
9090
config.substitutions.append( ('%{srcroot}', llbuild_src_root) )
9191
config.substitutions.append( ('%{swiftc-platform-flags}', "" if not config.osx_sysroot else "-sdk " + config.osx_sysroot) )
9292
config.substitutions.append( ('%{build-dir}', llbuild_obj_root) )
93+
config.substitutions.append( ('%{libllbuild}', 'libllbuild' if platform.system() == 'Windows' else 'llbuild') )
9394

9495
###
9596

0 commit comments

Comments
 (0)