This is an archive of the discontinued LLVM Phabricator instance.

Fix broken test suite on Windows after r223091
ClosedPublic

Authored by zturner on Dec 2 2014, 11:45 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner updated this revision to Diff 16826.Dec 2 2014, 11:45 AM
zturner retitled this revision from to Fix broken test suite on Windows after r223091.
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added a reviewer: ovyalov.
zturner added a subscriber: Unknown Object (MLST).
ovyalov accepted this revision.Dec 2 2014, 11:49 AM
ovyalov edited edge metadata.

Looks good - thank you for fixing this.

This revision is now accepted and ready to land.Dec 2 2014, 11:49 AM
zturner closed this revision.Dec 2 2014, 1:33 PM
zturner updated this revision to Diff 16827.

Closed by commit rL223155 (authored by @zturner).

You will actually want to set this correctly for windows. To find out what settings to use use:

cd test/lang/c/shared_lib
make

Then look for the shared library that was created "libfoo.dll"? If so your setup would be:

elif sys.platform.startswith('windows'):
    cls.platformContext = _PlatformContext('PATH', 'lib', 'dll')

I actually get errors when doing this.

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

This probably hints a deeper issue or just something else I haven't gotten
around to fixing yet (like maybe it's broken for all C files, and only
works for C++).

Just so I understand, is this a location where it's supposed to find system
libraries, like libc or similar? Or is this for something else? Clang is
pretty good about automatically finding all required libraries on Windows,
so if it's just for that it might not be needed, but if it's a place we're
putting our own shared libraries, then maybe we do.