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

build: support clang-cl compiler #169

Merged
merged 1 commit into from
Nov 15, 2024
Merged

build: support clang-cl compiler #169

merged 1 commit into from
Nov 15, 2024

Conversation

dmehala
Copy link
Collaborator

@dmehala dmehala commented Nov 15, 2024

Description

In another internal project that relies on dd-trace-cpp, I needed to enable cross-compilation for Windows from a Linux host. During this process, I used clang-cl as the compiler - MSVC frontend for clang. However, I encountered an issue where CMAKE_CXX_COMPILER_ID was detected as Clang, which caused the incorrect file to be included, leading to a compilation failure.

To address this, I utilized the CMAKE_CXX_COMPILER_FRONTEND_VARIANT variable. This change ensures that the correct compiler frontend (clang-cl) is identified, allowing for successful cross-compilation in this scenario.

@dmehala dmehala requested a review from a team as a code owner November 15, 2024 10:27
@dmehala dmehala requested review from dubloom, pablomartinezbernardo and a team and removed request for a team November 15, 2024 10:27
@pr-commenter
Copy link

pr-commenter bot commented Nov 15, 2024

Benchmarks

Benchmark execution time: 2024-11-15 10:35:58

Comparing candidate commit db1eefc in PR branch dmehala/win-xcomp with baseline commit bc70e5a in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.91%. Comparing base (bc70e5a) to head (db1eefc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #169   +/-   ##
=======================================
  Coverage   93.91%   93.91%           
=======================================
  Files          73       73           
  Lines        4176     4176           
=======================================
  Hits         3922     3922           
  Misses        254      254           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@pablomartinezbernardo pablomartinezbernardo left a comment

Choose a reason for hiding this comment

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

Thanks for the explanation!

@dmehala dmehala merged commit 3a8bcba into main Nov 15, 2024
22 checks passed
@dmehala dmehala deleted the dmehala/win-xcomp branch November 15, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants