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

fix CpuId when compiling with clang on windows #836

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

Techatrix
Copy link
Contributor

The __cpuidex intrinsic is only offered by msvc.

PS C:\Users\Techatrix\zls> zig c++ --version
clang version 18.1.7 (https://github.com/ziglang/zig-bootstrap ec2dca85a340f134d2fcfdc9007e91f9abed6996)
Target: x86_64-unknown-windows-gnu  
Thread model: posix
InstalledDir: C:/Users/Techatrix/zls

PS C:\Users\Techatrix\zls> zig c++ -c .\src\tracy\public\TracyClient.cpp -DTRACY_ENABLE=1
In file included from .\src\tracy\public\TracyClient.cpp:23:
.\src\tracy\public/client/TracyProfiler.cpp:312:5: error: use of undeclared identifier '__cpuidex'
  312 |     __cpuidex( (int*)regs, leaf, 0 );
      |     ^
1 error generated.

@wolfpld wolfpld merged commit f81e089 into wolfpld:master Jul 19, 2024
4 checks passed
@Techatrix Techatrix deleted the fix-windows-clang branch July 19, 2024 13:00
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.

2 participants