LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 21727 - Fix test Makefiles to support linking shared libraries on Windows.
Summary: Fix test Makefiles to support linking shared libraries on Windows.
Status: RESOLVED FIXED
Alias: None
Product: lldb
Classification: Unclassified
Component: All Bugs (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P normal
Assignee: Zachary Turner
URL:
Keywords:
Depends on: 21721
Blocks: 21766
  Show dependency tree
 
Reported: 2014-12-03 11:44 PST by Zachary Turner
Modified: 2015-03-13 16:51 PDT (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zachary Turner 2014-12-03 11:44:28 PST
When running make against test executables that link shared libraries, it fails.  Example:

d:\src\llvm\tools\lldb\test\lang\c\shared_lib>make CC=d:\src\llvm\build\ninja\bin\clang.exe
'g++' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the file specified.
The system cannot find the file specified.
d:\src\llvm\build\ninja\bin\clang.exe -g -O0 -m32  -fPIC -Id:/src/llvm/tools/lldb/test/make/../../include   -c -o main.o main.c
d:\src\llvm\build\ninja\bin\clang.exe -g -O0 -m32  -fPIC -Id:/src/llvm/tools/lldb/test/make/../../include   -c -o foo.o foo.c
d:\src\llvm\build\ninja\bin\clang.exe -g -O0 -m32  -fPIC -Id:/src/llvm/tools/lldb/test/make/../../include  -fuse-ld=lld foo.o -shared -o "libfoo.so"
clang.exe: warning: argument unused during compilation: '-shared'
Cannot infer subsystem; assuming /subsystem:console
Undefined symbol: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\libcmt.lib(f:\binaries\Intermediate\vctools\crt_bld\SELF_X86\crt\prebuild\build\INTEL\mt_obj\nativec\\crt0.obj): _main
symbol(s) not found
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libfoo.so] Error 1
Comment 1 Zachary Turner 2015-03-13 16:51:44 PDT
Fixed in r232220.