[Lldb-commits] [lldb] [LLDB][test] Update Makefile.rules to support Windows host+Linux target (PR #99266)

Vladislav Dzhidzhoev via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 18 09:15:46 PDT 2024


dzhidzhoev wrote:

> What exactly does it help with? Given that you're canonicalizing to a forward slash, does that mean that some of the tools you use don't accept backslashes (perhaps because they come from cygwin or the like)?

As far as I understand, MinGW make, on which Chocolatey build is based, prefers \ or / slashes.
Also, some include/library paths passed to clang seem to be ignored/incorrectly processed, when they have mixed path separators like C:\\..\..\foo/bar  

I get errors like 

```
make.exe 'VPATH=C:\lldb\test\API\commands\expression\call-function' -C 'C:\build-lldb\lldb-test-build.noindex\commands\expression\call-function\TestCallBuiltinFunction.test' -I 'C:\lldb\test\API\commands\expression\call-function' -I 'C:\lldb\packages\Python\lldbsuite\test\make' -f 'C:\lldb\test\API\commands\expression\call-function\Makefile' all ARCH=aarch64 'CC="C:\build-lldb\bin\clang.exe"' SDKROOT=c:/buildslave/fs/jetson-agx-ubuntu 'CLANG_MODULE_CACHE_DIR=C://build-lldb/lldb-test-build.noindex/module-cache-clang\lldb-api' LLDB_OBJ_ROOT=C://build-lldb/tools/lldb OS=Linux HOST_OS=Windows_NT



Build Command Output:

make-wfix: Entering directory 'C://build-lldb/lldb-test-build.noindex/commands/expression/call-function/TestCallBuiltinFunction.test'

"C:\build-lldb\bin\clang.exe"  -std=c++11 -g -O0 --sysroot "c:/buildslave/fs/jetson-agx-ubuntu"  -IC:\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC://build-lldb/tools/lldb/include -IC:\lldb\test\API\commands\expression\call-function -IC:\lldb\packages\Python\lldbsuite\test\make -include C:\lldb\packages\Python\lldbsuite\test\make/test_common.h      -MT main.o -MD -MP -MF main.d -c -o main.o C:\lldb\test\API\commands\expression\call-function/main.cpp

"C:\build-lldb\bin\clang.exe" main.o -g -O0 --sysroot "c:/buildslave/fs/jetson-agx-ubuntu"  -IC:\lldb\packages\Python\lldbsuite\test\make/../../../../..//include -IC://build-lldb/tools/lldb/include -IC:\lldb\test\API\commands\expression\call-function -IC:\lldb\packages\Python\lldbsuite\test\make -include C:\lldb\packages\Python\lldbsuite\test\make/test_common.h      -o "a.out"

ld.lld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::~basic_string()

>>> referenced by main.cpp:34 (C:\lldb\test\API\commands\expression\call-function\main.cpp:34)

>>>               main.o:(main)



ld.lld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__init(char const*, unsigned long)

>>> referenced by string:990 (C:\build-lldb\bin\..\include\c++\v1\string:990)

>>>               main.o:(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:ne190000]<0>(char const*))

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make-wfix: *** [Makefile.rules:675: a.out] Error 1

make-wfix: Leaving directory 'C://build-lldb/lldb-test-build.noindex/commands/expression/call-function/TestCallBuiltinFunction.test'


```

https://github.com/llvm/llvm-project/pull/99266


More information about the lldb-commits mailing list