Skip to content
Commit b13fc731 authored by Justas Janickas's avatar Justas Janickas
Browse files

[OpenCL] __cpp_threadsafe_static_init is by default undefined in OpenCL mode.

Definition of `__cpp_threadsafe_static_init` macro is controlled by
language option Opts.ThreadsafeStatics. This patch sets language
option to false by default in OpenCL mode, resulting in macro
`__cpp_threadsafe_static_init` being undefined. Default value can be
overridden using command line option -fthreadsafe-statics.

Change is supposed to address portability because not all OpenCL
vendors support thread safe implementation of static initialization.

Fixes llvm.org/PR48012

Differential Revision: https://reviews.llvm.org/D107163
parent cd2387b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment