Skip to content
This repository was archived by the owner on Aug 10, 2021. It is now read-only.

Conversation

PavelPunegov
Copy link
Contributor

@PavelPunegov PavelPunegov commented Nov 5, 2020

Compile to the .o file and then link it with all options.

Now the final binary has correct dependencies:

  1. Before:
Pavel@win MINGW64 /d/Pavel/ws/kotlin-native (clang-invoke-fix)
$ ldd ./test.output/local/interop_cleaners_second_thread/mingw_x64/interop_cleaners_second_thread.exe
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7fff49840000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7fff49740000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7fff47350000)
        msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7fff48860000)
        libstdc++-6.dll => /mingw64/bin/libstdc++-6.dll (0x6fc40000)
        libgcc_s_seh-1.dll => /mingw64/bin/libgcc_s_seh-1.dll (0x61440000)
        interop_cleaners_second_thread.dll => /d/Pavel/ws/kotlin-native/test.output/local/interop_cleaners_second_thread/mingw_x64/interop_cleaners_second_thread.dll (0x57390000)
        USER32.dll => /c/WINDOWS/System32/USER32.dll (0x7fff47fe0000)
        win32u.dll => /c/WINDOWS/System32/win32u.dll (0x7fff472c0000)
        GDI32.dll => /c/WINDOWS/System32/GDI32.dll (0x7fff48c90000)
        libwinpthread-1.dll => /mingw64/bin/libwinpthread-1.dll (0x64940000)
        ??? => ??? (0x180000)
        gdi32full.dll => /c/WINDOWS/System32/gdi32full.dll (0x7fff47120000)
        msvcp_win.dll => /c/WINDOWS/System32/msvcp_win.dll (0x7fff477d0000)
        ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7fff467d0000)
  1. After:
Pavel@win MINGW64 /d/Pavel/ws/kotlin-native (clang-invoke-fix)
$ ldd ./test.output/local/interop_cleaners_second_thread/mingw_x64/interop_cleaners_second_thread.exe
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7fff49840000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7fff49740000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7fff47350000)
        msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7fff48860000)
        interop_cleaners_second_thread.dll => /d/Pavel/ws/kotlin-native/test.output/local/interop_cleaners_second_thread/mingw_x64/interop_cleaners_second_thread.dll (0x572a0000)

@PavelPunegov PavelPunegov merged commit ee9211f into master Nov 9, 2020
@PavelPunegov PavelPunegov deleted the clang-invoke-fix branch November 9, 2020 12:25
erokhins pushed a commit that referenced this pull request Dec 21, 2020
…s the build. (#4499)

Fix clang invocation in the tests: use linker with the same options as the build.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants