WebKit Bugzilla
Attachment 350006 Details for
Bug 171618
: [Win][Meta] Build WebKit using Clang
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP Patch not to define WTF_COMPILER_MSVC
wip.patch (text/plain), 8.87 KB, created by
Fujii Hironori
on 2018-09-17 23:41:40 PDT
(
hide
)
Description:
WIP Patch not to define WTF_COMPILER_MSVC
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-09-17 23:41:40 PDT
Size:
8.87 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp >index 43b86251716..d11618c0703 100644 >--- a/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp >+++ b/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp >@@ -31,7 +31,7 @@ > #include "ProbeContext.h" > #include <wtf/InlineASM.h> > >-#if COMPILER(MSVC) >+#if OS(WINDOWS) > #include <intrin.h> > #endif > >@@ -171,7 +171,7 @@ static_assert((PROBE_EXECUTOR_OFFSET + PTR_SIZE) <= (PROBE_SIZE + OUT_SIZE), "Mu > #undef PROBE_OFFSETOF > > #if CPU(X86) >-#if COMPILER(GCC_OR_CLANG) >+#if COMPILER(GCC_OR_CLANG) && !OS(WINDOWS) > asm ( > ".globl " SYMBOL_STRING(ctiMasmProbeTrampoline) "\n" > HIDE_SYMBOL(ctiMasmProbeTrampoline) "\n" >@@ -340,7 +340,7 @@ asm ( > ); > #endif > >-#if COMPILER(MSVC) >+#if OS(WINDOWS) > extern "C" __declspec(naked) void ctiMasmProbeTrampoline() > { > __asm { >@@ -506,12 +506,12 @@ extern "C" __declspec(naked) void ctiMasmProbeTrampoline() > ret > } > } >-#endif // COMPILER(MSVC) >+#endif // OS(WINDOWS) > > #endif // CPU(X86) > > #if CPU(X86_64) >-#if COMPILER(GCC_OR_CLANG) >+#if COMPILER(GCC_OR_CLANG) && !OS(WINDOWS) > asm ( > ".globl " SYMBOL_STRING(ctiMasmProbeTrampoline) "\n" > HIDE_SYMBOL(ctiMasmProbeTrampoline) "\n" >@@ -769,7 +769,7 @@ MacroAssemblerX86Common::CPUID MacroAssemblerX86Common::getCPUID(unsigned level) > MacroAssemblerX86Common::CPUID MacroAssemblerX86Common::getCPUIDEx(unsigned level, unsigned count) > { > CPUID result { }; >-#if COMPILER(MSVC) >+#if OS(WINDOWS) > __cpuidex(bitwise_cast<int*>(result.data()), level, count); > #else > __asm__ ( >diff --git a/Source/JavaScriptCore/jit/JITOperations.cpp b/Source/JavaScriptCore/jit/JITOperations.cpp >index b2eb418cff8..32d26569738 100644 >--- a/Source/JavaScriptCore/jit/JITOperations.cpp >+++ b/Source/JavaScriptCore/jit/JITOperations.cpp >@@ -2462,10 +2462,10 @@ void JIT_OPERATION operationExceptionFuzz(ExecState* exec) > NativeCallFrameTracer tracer(vm, exec); > auto scope = DECLARE_THROW_SCOPE(*vm); > UNUSED_PARAM(scope); >-#if COMPILER(GCC_OR_CLANG) >+#if !OS(WINDOWS) > void* returnPC = __builtin_return_address(0); > doExceptionFuzzing(exec, scope, "JITOperations", returnPC); >-#endif // COMPILER(GCC_OR_CLANG) >+#endif // !OS(WINDOWS) > } > > ALWAYS_INLINE static EncodedJSValue unprofiledAdd(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) >@@ -2918,7 +2918,7 @@ extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWi > return JSValue::encode(exec->vm().hostCallReturnValue); > } > >-#if COMPILER(GCC_OR_CLANG) && CPU(X86_64) >+#if !OS(WINDOWS) && CPU(X86_64) > asm ( > ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" > HIDE_SYMBOL(getHostCallReturnValue) "\n" >@@ -2927,7 +2927,7 @@ SYMBOL_STRING(getHostCallReturnValue) ":" "\n" > "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" > ); > >-#elif COMPILER(GCC_OR_CLANG) && CPU(X86) >+#elif !OS(WINDOWS) && CPU(X86) > asm ( > ".text" "\n" \ > ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >@@ -2943,7 +2943,7 @@ SYMBOL_STRING(getHostCallReturnValue) ":" "\n" > "ret\n" > ); > >-#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_THUMB2) >+#elif !OS(WINDOWS) && CPU(ARM_THUMB2) > asm ( > ".text" "\n" > ".align 2" "\n" >@@ -2956,7 +2956,7 @@ SYMBOL_STRING(getHostCallReturnValue) ":" "\n" > "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" > ); > >-#elif COMPILER(GCC_OR_CLANG) && CPU(ARM_TRADITIONAL) >+#elif !OS(WINDOWS) && CPU(ARM_TRADITIONAL) > asm ( > ".text" "\n" > ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" >@@ -2978,7 +2978,7 @@ SYMBOL_STRING(getHostCallReturnValue) ":" "\n" > "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" > ); > >-#elif COMPILER(GCC_OR_CLANG) && CPU(MIPS) >+#elif !OS(WINDOWS) && CPU(MIPS) > > #if WTF_MIPS_PIC > #define LOAD_FUNCTION_TO_T9(function) \ >diff --git a/Source/JavaScriptCore/jit/RegisterAtOffset.cpp b/Source/JavaScriptCore/jit/RegisterAtOffset.cpp >index 16a639ca8c7..afd48a8443f 100644 >--- a/Source/JavaScriptCore/jit/RegisterAtOffset.cpp >+++ b/Source/JavaScriptCore/jit/RegisterAtOffset.cpp >@@ -30,7 +30,7 @@ > > namespace JSC { > >-#if !COMPILER(MSVC) >+#if !OS(WINDOWS) > static_assert(sizeof(RegisterAtOffset) == sizeof(ptrdiff_t), "RegisterAtOffset should be small."); > #endif > >diff --git a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h >index a6437d403a4..77ff366f3ae 100644 >--- a/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h >+++ b/Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h >@@ -49,13 +49,13 @@ > > #define OFFLINE_ASM_C_LOOP 0 > >-#if CPU(X86) && !COMPILER(MSVC) >+#if CPU(X86) && !OS(WINDOWS) > #define OFFLINE_ASM_X86 1 > #else > #define OFFLINE_ASM_X86 0 > #endif > >-#if CPU(X86) && COMPILER(MSVC) >+#if CPU(X86) && OS(WINDOWS) > #define OFFLINE_ASM_X86_WIN 1 > #else > #define OFFLINE_ASM_X86_WIN 0 >@@ -92,13 +92,13 @@ > #define OFFLINE_ASM_ARM 0 > #endif > >-#if CPU(X86_64) && !COMPILER(MSVC) >+#if CPU(X86_64) && !OS(WINDOWS) > #define OFFLINE_ASM_X86_64 1 > #else > #define OFFLINE_ASM_X86_64 0 > #endif > >-#if CPU(X86_64) && COMPILER(MSVC) >+#if CPU(X86_64) && OS(WINDOWS) > #define OFFLINE_ASM_X86_64_WIN 1 > #else > #define OFFLINE_ASM_X86_64_WIN 0 >diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp >index 78bff0884c4..6210369fdba 100644 >--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp >+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp >@@ -507,7 +507,7 @@ JSValue CLoop::execute(OpcodeID entryOpcodeID, void* executableAddress, VM* vm, > > } // namespace JSC > >-#elif !COMPILER(MSVC) >+#elif !OS(WINDOWS) > > //============================================================================ > // Define the opcode dispatch mechanism when using an ASM loop: >diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h >index 71e6b8e6a08..acc33f23708 100644 >--- a/Source/WTF/wtf/Compiler.h >+++ b/Source/WTF/wtf/Compiler.h >@@ -82,7 +82,7 @@ > #endif // defined(__clang__) > > /* COMPILER(GCC_OR_CLANG) - GNU Compiler Collection or Clang */ >-#if defined(__GNUC__) >+#if defined(__GNUC__) || defined(__clang__) > #define WTF_COMPILER_GCC_OR_CLANG 1 > #endif > >@@ -121,7 +121,7 @@ > > /* COMPILER(MSVC) - Microsoft Visual C++ */ > >-#if defined(_MSC_VER) >+#if defined(_MSC_VER) && !COMPILER(CLANG) > > #define WTF_COMPILER_MSVC 1 > >diff --git a/Source/WTF/wtf/DateMath.cpp b/Source/WTF/wtf/DateMath.cpp >index 3de9c6d9a65..cbe33627351 100644 >--- a/Source/WTF/wtf/DateMath.cpp >+++ b/Source/WTF/wtf/DateMath.cpp >@@ -125,7 +125,7 @@ static const int firstDayOfMonth[2][12] = { > > static inline void getLocalTime(const time_t* localTime, struct tm* localTM) > { >-#if COMPILER(MSVC) >+#if OS(WINDOWS) > localtime_s(localTM, localTime); > #elif HAVE(LOCALTIME_R) > localtime_r(localTime, localTM); >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index e569cdc5638..d7eb4621cc7 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -951,7 +951,7 @@ > #define ENABLE_COMPUTED_GOTO_OPCODES 1 > #endif > >-#if ENABLE(JIT) && !COMPILER(MSVC) && \ >+#if ENABLE(JIT) && !OS(WINDOWS) && \ > (CPU(X86) || CPU(X86_64) || CPU(ARM64) || (CPU(ARM_THUMB2) && OS(DARWIN))) > /* This feature works by embedding the OpcodeID in the 32 bit just before the generated LLint code > that executes each opcode. It cannot be supported by the CLoop since there's no way to embed the >diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake >index 72dc5c96779..6bd1ff7fa69 100644 >--- a/Source/cmake/WebKitCompilerFlags.cmake >+++ b/Source/cmake/WebKitCompilerFlags.cmake >@@ -116,18 +116,17 @@ if (COMPILER_IS_GCC_OR_CLANG) > WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-unknown-pragmas) > add_definitions(-D__USE_MINGW_ANSI_STDIO=1) > endif () >+ # Warnings to be enabled >+ WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wall >+ -Wextra >+ -Wcast-align >+ -Wformat-security >+ -Wmissing-format-attribute >+ -Wpointer-arith >+ -Wundef >+ -Wwrite-strings) > endif () > >- # Warnings to be enabled >- WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wall >- -Wextra >- -Wcast-align >- -Wformat-security >- -Wmissing-format-attribute >- -Wpointer-arith >- -Wundef >- -Wwrite-strings) >- > # Warnings to be disabled > # FIXME: We should probably not be disabling -Wno-maybe-uninitialized? > WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Qunused-arguments
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 171618
:
349006
|
349010
|
349627
|
350006
|
350007
|
467870