mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1028945 - Allow building ICU with clang-cl; r=Waldo
--HG-- extra : rebase_source : cc09faf999e90567de564c0b0b8349c701b73f83
This commit is contained in:
parent
c0d2e12129
commit
e99c905c87
23
intl/icu-patches/clang-cl.diff
Normal file
23
intl/icu-patches/clang-cl.diff
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/intl/icu/source/common/umutex.cpp b/intl/icu/source/common/umutex.cpp
|
||||
index 8f55208..281c370 100644
|
||||
--- a/intl/icu/source/common/umutex.cpp
|
||||
+++ b/intl/icu/source/common/umutex.cpp
|
||||
@@ -64,17 +64,17 @@ static UMutex globalMutex = U_MUTEX_INITIALIZER;
|
||||
// the caller needs to call the Init function.
|
||||
//
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
U_COMMON_API UBool U_EXPORT2 umtx_initImplPreInit(UInitOnce &uio) {
|
||||
for (;;) {
|
||||
int32_t previousState = InterlockedCompareExchange(
|
||||
-#if (U_PLATFORM == U_PF_MINGW) || (U_PLATFORM == U_PF_CYGWIN)
|
||||
+#if (U_PLATFORM == U_PF_MINGW) || (U_PLATFORM == U_PF_CYGWIN) || defined(__clang__)
|
||||
(LONG volatile *) // this is the type given in the API doc for this function.
|
||||
#endif
|
||||
&uio.fState, // Destination
|
||||
1, // Exchange Value
|
||||
0); // Compare value
|
||||
|
||||
if (previousState == 0) {
|
||||
return true; // Caller will next call the init function.
|
@ -69,7 +69,7 @@ U_NAMESPACE_BEGIN
|
||||
U_COMMON_API UBool U_EXPORT2 umtx_initImplPreInit(UInitOnce &uio) {
|
||||
for (;;) {
|
||||
int32_t previousState = InterlockedCompareExchange(
|
||||
#if (U_PLATFORM == U_PF_MINGW) || (U_PLATFORM == U_PF_CYGWIN)
|
||||
#if (U_PLATFORM == U_PF_MINGW) || (U_PLATFORM == U_PF_CYGWIN) || defined(__clang__)
|
||||
(LONG volatile *) // this is the type given in the API doc for this function.
|
||||
#endif
|
||||
&uio.fState, // Destination
|
||||
|
@ -56,5 +56,6 @@ patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-915735
|
||||
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/genrb-omitCollationRules.diff
|
||||
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/qualify-uinitonce-windows.diff
|
||||
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/suppress-warnings.diff
|
||||
patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/clang-cl.diff
|
||||
|
||||
hg addremove ${icu_dir}
|
||||
|
Loading…
Reference in New Issue
Block a user