Skip to content

Conversation

@Steelskin
Copy link
Contributor

This is needed when building with LLVM_LINK_LLVM_DYLIB to build LLVM as a DLL on Windows.

This effort is tracked in #109483.

This is needed when building with `LLVM_LINK_LLVM_DYLIB` to build LLVM
as a DLL on Windows.

This effort is tracked in llvm#109483.
@llvmbot
Copy link
Member

llvmbot commented Nov 14, 2025

@llvm/pr-subscribers-lldb

Author: Fabrice de Gans (Steelskin)

Changes

This is needed when building with LLVM_LINK_LLVM_DYLIB to build LLVM as a DLL on Windows.

This effort is tracked in #109483.


Full diff: https://github.com/llvm/llvm-project/pull/168093.diff

1 Files Affected:

  • (modified) lldb/cmake/modules/AddLLDB.cmake (+1)
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 5d58abf237f58..6493df27f38db 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -172,6 +172,7 @@ function(add_lldb_executable name)
     if(NOT LIBLLDB_INDEX EQUAL -1)
       if (MSVC)
         target_link_options(${name} PRIVATE "/DELAYLOAD:$<TARGET_FILE_NAME:liblldb>")
+        target_link_libraries(${name} PRIVATE delayimp)
       elseif (MINGW AND LINKER_IS_LLD)
         # LLD can delay load just by passing a --delayload flag, as long as the import
         # library is a short type import library (which LLD and MS link.exe produce).

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Steelskin
Copy link
Contributor Author

Could one of you land this for me, please? I do not have the rights.

@JDevlieghere JDevlieghere merged commit d06a7dd into llvm:main Nov 14, 2025
12 checks passed
@Steelskin Steelskin deleted the fabrice/link-delayimp-lib branch November 14, 2025 18:44
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-ubuntu running on as-builder-9 while building lldb at step 16 "test-check-lldb-api".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/17351

Here is the relevant piece of the build log for the reference
Step 16 (test-check-lldb-api) failure: Test just built components: check-lldb-api completed (failure)
...
PASS: lldb-api :: types/TestRecursiveTypes.py (1315 of 1324)
PASS: lldb-api :: types/TestIntegerType.py (1316 of 1324)
UNSUPPORTED: lldb-api :: windows/launch/missing-dll/TestMissingDll.py (1317 of 1324)
UNSUPPORTED: lldb-api :: windows/launch/replace-dll/TestReplaceDLL.py (1318 of 1324)
PASS: lldb-api :: types/TestIntegerTypeExpr.py (1319 of 1324)
PASS: lldb-api :: types/TestShortType.py (1320 of 1324)
PASS: lldb-api :: types/TestShortTypeExpr.py (1321 of 1324)
PASS: lldb-api :: types/TestLongTypes.py (1322 of 1324)
PASS: lldb-api :: types/TestLongTypesExpr.py (1323 of 1324)
TIMEOUT: lldb-api :: python_api/process/cancel_attach/TestCancelAttach.py (1324 of 1324)
******************** TEST 'lldb-api :: python_api/process/cancel_attach/TestCancelAttach.py' FAILED ********************
Script:
--
/usr/bin/python3.12 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --libcxx-include-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/c++/v1 --libcxx-include-target-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/aarch64-unknown-linux-gnu/c++/v1 --libcxx-library-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib/aarch64-unknown-linux-gnu --arch aarch64 --build-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/lldb --compiler /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang --dsymutil /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --lldb-obj-root /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb --lldb-libs-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --cmake-build-type Release --platform-url connect://jetson-agx-2198.lab.llvm.org:1234 --platform-working-dir /home/ubuntu/lldb-tests --sysroot /mnt/fs/jetson-agx-ubuntu --env ARCH_CFLAGS=-mcpu=cortex-a78 --platform-name remote-linux --skip-category=lldb-server /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/python_api/process/cancel_attach -p TestCancelAttach.py
--
Exit Code: -9
Timeout: Reached timeout of 600 seconds

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision d06a7dd35e5a1d7b6309930cdf13033a3d08b542)
  clang revision d06a7dd35e5a1d7b6309930cdf13033a3d08b542
  llvm revision d06a7dd35e5a1d7b6309930cdf13033a3d08b542

--
Command Output (stderr):
--
WARNING:root:Custom libc++ is not supported for remote runs: ignoring --libcxx arguments
FAIL: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_scripted_implementation (TestCancelAttach.AttachCancelTestCase.test_scripted_implementation)

--

********************
Slowest Tests:
--------------------------------------------------------------------------
600.04s: lldb-api :: python_api/process/cancel_attach/TestCancelAttach.py
123.83s: lldb-api :: functionalities/progress_reporting/TestProgressReporting.py
73.59s: lldb-api :: functionalities/data-formatter/data-formatter-stl/libcxx-simulators/string/TestDataFormatterLibcxxStringSimulator.py
70.11s: lldb-api :: commands/process/attach/TestProcessAttach.py
60.76s: lldb-api :: commands/command/script_alias/TestCommandScriptAlias.py
37.44s: lldb-api :: functionalities/single-thread-step/TestSingleThreadStepTimeout.py
35.59s: lldb-api :: functionalities/completion/TestCompletion.py
25.27s: lldb-api :: commands/statistics/basic/TestStats.py
23.38s: lldb-api :: commands/dwim-print/TestDWIMPrint.py
22.27s: lldb-api :: python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
21.24s: lldb-api :: functionalities/gdb_remote_client/TestGDBRemoteClient.py
20.57s: lldb-api :: functionalities/gdb_remote_client/TestPlatformClient.py
20.01s: lldb-api :: functionalities/thread/state/TestThreadStates.py
15.11s: lldb-api :: python_api/find_in_memory/TestFindRangesInMemory.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants