File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ namespace LIBC_NAMESPACE {
1515// insufficient.
1616// TODO: Once we have another use-case for this we should put it in a common
1717// device environment struct.
18- extern " C" [[gnu::visibility(" protected" )]] uint64_t __llvm_libc_clock_freq =
19- clock_freq;
18+ gpu::Constant<uint64_t > __llvm_libc_clock_freq = clock_freq;
2019#endif
2120
2221} // namespace LIBC_NAMESPACE
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ constexpr uint64_t clock_freq = 100000000UL;
2323
2424// We provide an externally visible symbol such that the runtime can set
2525// this to the correct value.
26- extern " C" [[gnu::visibility(" protected" )]] uint64_t __llvm_libc_clock_freq;
26+ extern " C" {
27+ [[gnu::visibility(" protected" )]]
28+ extern gpu::Constant<uint64_t > __llvm_libc_clock_freq;
29+ }
2730#define GPU_CLOCKS_PER_SEC static_cast <clock_t >(__llvm_libc_clock_freq)
2831
2932#elif defined(LIBC_TARGET_ARCH_IS_NVPTX)
You can’t perform that action at this time.
0 commit comments