source: webkit/trunk/Source/JavaScriptCore/PlatformMac.cmake

Last change on this file was 287510, checked in by ysuzuki@apple.com, 3 years ago

[JSC] Replace UDIS86 with Zydis
https://bugs.webkit.org/show_bug.cgi?id=234765

Reviewed by Michael Saboff.

Source/JavaScriptCore:

UDIS86 is not updated from 2014. Since it is missing relatively new SIMD opcodes,
we cannot disassemble these opcodes when implementing Wasm SIMD.
This patch replaces UDIS86 with Zydis, which is actively developed and used in
SpiderMonkey too. It is under MIT license.

This patch imports Zydis v3.2.1.

  1. Import header and C files of Zydis and Zycore in a flattened manner.
  2. Add directory names to the files (e.g. Zydis/Decoder.c => ZydisDecoder.c) to make it easy to build in JSC build.
  3. Replace header includes from #include <Zydis/XXX.h> to #include "ZydisXXX.h".
  4. Fix compile errors with our stricter compiler flags.
  5. Remove Zycore API files and ZycoreArgParse.[hc] since they are not used.

We didn't add files to Sources.txt since unified builds do not support C files currently.

Source/WTF:

  • wtf/PlatformEnable.h:
File size: 2.4 KB
Line 
1add_definitions(-D__STDC_WANT_LIB_EXT1__)
2
3find_library(SECURITY_LIBRARY Security)
4list(APPEND JavaScriptCore_LIBRARIES
5 ${SECURITY_LIBRARY}
6)
7
8list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
9 "SourcesCocoa.txt"
10
11 "inspector/remote/SourcesCocoa.txt"
12)
13
14list(APPEND JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES
15 ${JAVASCRIPTCORE_DIR}/inspector/cocoa
16 ${JAVASCRIPTCORE_DIR}/inspector/remote/cocoa
17)
18
19list(APPEND JavaScriptCore_PUBLIC_FRAMEWORK_HEADERS
20 API/JSCallbackFunction.h
21 API/JSContext.h
22 API/JSContextPrivate.h
23 API/JSContextRefPrivate.h
24 API/JSExport.h
25 API/JSManagedValue.h
26 API/JSStringRefCF.h
27 API/JSValue.h
28 API/JSValuePrivate.h
29 API/JSVirtualMachine.h
30 API/JavaScriptCore.h
31)
32
33list(APPEND JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
34 inspector/remote/RemoteInspectorConstants.h
35
36 inspector/remote/cocoa/RemoteInspectorXPCConnection.h
37)
38
39# FIXME: Make including these files consistent in the source so these forwarding headers are not needed.
40if (NOT EXISTS ${JavaScriptCore_DERIVED_SOURCES_DIR}/AugmentableInspectorControllerClient.h)
41 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/AugmentableInspectorControllerClient.h "#include \"inspector/augmentable/AugmentableInspectorControllerClient.h\"")
42endif ()
43if (NOT EXISTS ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorFrontendRouter.h)
44 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorFrontendRouter.h "#include \"inspector/InspectorFrontendRouter.h\"")
45endif ()
46if (NOT EXISTS ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorBackendDispatcher.h)
47 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorBackendDispatcher.h "#include \"inspector/InspectorBackendDispatcher.h\"")
48endif ()
49if (NOT EXISTS ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorBackendDispatchers.h)
50 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorBackendDispatchers.h "#include \"inspector/InspectorBackendDispatchers.h\"")
51endif ()
52if (NOT EXISTS ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorFrontendDispatchers.h)
53 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorFrontendDispatchers.h "#include \"inspector/InspectorFrontendDispatchers.h\"")
54endif ()
55if (NOT EXISTS ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorProtocolObjects.h)
56 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/InspectorProtocolObjects.h "#include \"inspector/InspectorProtocolObjects.h\"")
57endif ()
Note: See TracBrowser for help on using the repository browser.