Otherwise on Linux e.g. the api/command-return-object test uses libstdc++ for the test app and libc++ is used for the lldb library, and some objects such as std::shared_ptr are not binary compatible between the two libs, leading to "mysterious" crashes.
Details
Diff Detail
- Repository
- rLLDB LLDB
Event Timeline
Thanks for working on this! This looks good to me, but I wonder if doing this with a dedicated flag instead of an environment variable would be better. But I'll leave that to the others who have a better idea how the dotest flags should work.
Out of curiosity, will this also fix the TestPluginCommands.py ?
lldb/test/API/lit.site.cfg.py.in | ||
---|---|---|
24 | Maybe move this below the config.llvm_use_sanitizer line, as this is currently in the middle of the python/dotest.py-related config flags. |
Yeah, please make this a dedicated flag and store its value in the configuration. We've been slowly (but steadily) moving away from passing around things trough the environment.
I actually think tests relying on this should be converted to c++ unit tests. The logic to compile and link against liblldb takes up a considerable chunk of our test buildsystem. Why recreate that logic, when cmake knows how to do that already? TestPluginCommands might be more involved, but converting api/command-return-object should be trivial using the api unit test framework we already have (unittests/API)...
The change to use the configuration looks good, but I think Pavel raised a good point. Which tests are affected by this? How much work would it be to convert them as suggested?
I don't know. There are 5 hits for 'buildDriver' and 8 for '%include_SB_APIs%' under tests/, so at least 13, but I don't know if that's all.
How much work would it be to convert them as suggested?
I don't know either. I don't plan on doing that, at least not now. My patch is a fix and it's done. The suggestion is an improvement. surely it can be done after the fix.
Maybe move this below the config.llvm_use_sanitizer line, as this is currently in the middle of the python/dotest.py-related config flags.