[all-commits] [llvm/llvm-project] b13fc7: [OpenCL] __cpp_threadsafe_static_init is by defaul...
Justas Janickas via All-commits
all-commits at lists.llvm.org
Mon Aug 2 06:11:18 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b13fc7311eabca27b3baea99b7be6edef0213406
https://github.com/llvm/llvm-project/commit/b13fc7311eabca27b3baea99b7be6edef0213406
Author: Justas Janickas <Justas.Janickas at arm.com>
Date: 2021-08-02 (Mon, 02 Aug 2021)
Changed paths:
M clang/lib/Driver/ToolChains/Clang.cpp
A clang/test/Driver/threadsafe-statics.clcpp
Log Message:
-----------
[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
More information about the All-commits
mailing list