Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMake]: Use check_linker_flag for /DEPENDENTLOADFLAG #2301

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 8, 2024

  1. [CMake]: Use check_linker_flag for /DEPENDENTLOADFLAG

    PR oneapi-src#2100 changed the WIN32 check to check from `if(WIN32)` to
    checking if link.exe is used via `CMAKE_CXX_COMPILER_LINKER_ID`.
    This has two problems:
    - CMAKE_CXX_COMPILER_LINKER_ID is only supported starting with CMake 3.29,
      but UR still claims to CMake versions from 3.20
      (`cmake_minimum_required` is called with this version).
      This results in the flag being silently dropped in earlier versions of
      CMake.
    - There are other linkers that also support this flag for example LLD.
    
    Using check_linker_flag resolves these issues without hard-coding a list
    of known linkers.
    Maetveis committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    bd3d995 View commit details
    Browse the repository at this point in the history