<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/118748>118748</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [compiler-rt][Asan] lld: error: unknown argument: --dependency-file for cross compiling windows-gnu targets
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          trcrsired
      </td>
    </tr>
</table>

<pre>
    ```
[2/3] Linking CXX shared library lib/windows/libclang_rt.asan_dynamic-x86_64.dll
FAILED: lib/windows/libclang_rt.asan_dynamic-x86_64.dll lib/windows/libclang_rt.asan_dynamic-x86_64.dll.a 
: && /home/csrg/toolchains/llvm/x86_64-generic-linux-gnu/llvm/bin/clang++ --target=x86_64-windows-gnu --sysroot=/home/csrg/toolchains/llvm/x86_64-windows-gnu/x86_64-windows-gnu -fuse-ld=lld -flto=thin -rtlib=compiler-rt  -Wno-unused-command-line-argument -lc++abi -Wall -Wno-unused-parameter -O3 -DNDEBUG -flto=thin  -m64 -nodefaultlibs -nostdlib++ -Xlinker --dependency-file -Xlinker lib/asan/CMakeFiles/clang_rt.asan-dynamic-x86_64.dir/link.d -shared -o lib/windows/libclang_rt.asan_dynamic-x86_64.dll -Wl,--out-implib,lib/windows/libclang_rt.asan_dynamic-x86_64.dll.a -Wl,--major-image-version,0,--minor-image-version,0 lib/interception/CMakeFiles/RTInterception.x86_64.dir/interception_linux.cpp.obj lib/interception/CMakeFiles/RTInterception.x86_64.dir/interception_mac.cpp.obj lib/interception/CMakeFiles/RTInterception.x86_64.dir/interception_win.cpp.obj lib/interception/CMakeFiles/RTInterception.x86_64.dir/interception_type_test.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_allocator.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_common.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_deadlock_detector1.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_deadlock_detector2.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_errno.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_file.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_flags.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_flag_parser.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_fuchsia.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_libc.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_libignore.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_linux.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_linux_s390.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_mac.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_mutex.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_netbsd.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_freebsd.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_linux.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_netbsd.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_posix.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_platform_limits_solaris.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_posix.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_printf.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_procmaps_common.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_procmaps_bsd.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_procmaps_fuchsia.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_procmaps_linux.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_procmaps_mac.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_procmaps_solaris.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_range.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_solaris.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_stoptheworld_fuchsia.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_stoptheworld_mac.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_stoptheworld_win.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_suppressions.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_tls_get_addr.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_thread_arg_retval.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_thread_registry.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_type_traits.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_win.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_win_interception.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_termination.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_common_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_allocator_checks.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_dl.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_linux_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_mac_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_posix_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_netbsd_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sancov_flags.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sanitizer_coverage_fuchsia.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sanitizer_coverage_libcdep_new.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sanitizer_coverage_win_sections.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_allocator_report.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_chained_origin_depot.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stack_store.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stackdepot.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_printer.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_sparc.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_libbacktrace.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_mac.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_markup.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_markup_fuchsia.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_posix_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_report.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_report_fuchsia.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_win.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_thread_history.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_unwind_linux_libcdep.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_unwind_fuchsia.cpp.obj lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_unwind_win.cpp.obj lib/lsan/CMakeFiles/RTLSanCommon.x86_64.dir/lsan_common.cpp.obj lib/lsan/CMakeFiles/RTLSanCommon.x86_64.dir/lsan_common_fuchsia.cpp.obj lib/lsan/CMakeFiles/RTLSanCommon.x86_64.dir/lsan_common_linux.cpp.obj lib/lsan/CMakeFiles/RTLSanCommon.x86_64.dir/lsan_common_mac.cpp.obj lib/ubsan/CMakeFiles/RTUbsan.x86_64.dir/ubsan_diag.cpp.obj lib/ubsan/CMakeFiles/RTUbsan.x86_64.dir/ubsan_init.cpp.obj lib/ubsan/CMakeFiles/RTUbsan.x86_64.dir/ubsan_flags.cpp.obj lib/ubsan/CMakeFiles/RTUbsan.x86_64.dir/ubsan_handlers.cpp.obj lib/ubsan/CMakeFiles/RTUbsan.x86_64.dir/ubsan_monitor.cpp.obj lib/ubsan/CMakeFiles/RTUbsan.x86_64.dir/ubsan_value.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_allocator.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_activation.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_debugging.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_descriptions.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_errors.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_fake_stack.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_flags.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_fuchsia.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_globals.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_globals_win.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_interceptors.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_interceptors_memintrinsics.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_linux.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_mac.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_malloc_linux.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_malloc_mac.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_malloc_win.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_memory_profile.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_poisoning.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_posix.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_premap_shadow.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_report.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_rtl.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_shadow_setup.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_stack.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_stats.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_suppressions.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_thread.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_win.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_new_delete.cpp.obj lib/asan/CMakeFiles/RTAsan_dynamic_version_script_dummy.x86_64.dir/dummy.cpp.obj lib/ubsan/CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_handlers_cxx.cpp.obj lib/ubsan/CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash.cpp.obj lib/ubsan/CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_itanium.cpp.obj lib/ubsan/CMakeFiles/RTUbsan_cxx.x86_64.dir/ubsan_type_hash_win.cpp.obj  -lm -lmingw32 /home/csrg/toolchains/llvm/x86_64-generic-linux-gnu/llvm/lib/clang/20/lib/windows/libclang_rt.builtins-x86_64.a -lmoldname  -lmingwex  -lmsvcrt  -ladvapi32  -lshell32  -luser32  -lkernel32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && :
lld: error: unknown argument: --dependency-file
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEm99v4joWx_8a82IZUQdK-8ADLZfVlWZ3pfmhmbfI2IfgwbEj24Gyf_3KCbRQMjMlxFxpRqRJ_PnaPicnPo7NnJOZBpig0RMazXqs9CtjJ95y66QF0VsYsZug-8H-32CKRk8U0XmCRjP8Seq11Bl-_vEDuxWzILCSC8vsLvwiOt9KLczWITpXcsEV01lqfZ85plOx0yyXnLw83Kf3w75QCg2m8-nfn_6aoWTapnybMn2GQ5uSKUb0HtF7jOh8ZXJAdM6dzRCde2MUXzGpK6La5IjO6_IkAw1WcqKkLl9Ipsu3OxZSB0RQR_QJ0SdMiGc2A4-S2b74vqKhICbE7Zw1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