JSC should explicitly list its modulemap file
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2018 00:14:30 +0000 (00:14 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2018 00:14:30 +0000 (00:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191032

Reviewed by Saam Barati.

The automagically generated module map file for JSC will
include headers where they may not work out of the box.
This patch makes it so we now export the same modulemap
that used to be provided via the legacy system.

* Configurations/JavaScriptCore.xcconfig:
* JavaScriptCore.modulemap: Added.
* JavaScriptCore.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237575 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
Source/JavaScriptCore/JavaScriptCore.modulemap [new file with mode: 0644]
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

index 88925e5..653e5cd 100644 (file)
@@ -1,3 +1,19 @@
+2018-10-29  Keith Miller  <keith_miller@apple.com>
+
+        JSC should explicitly list its modulemap file
+        https://bugs.webkit.org/show_bug.cgi?id=191032
+
+        Reviewed by Saam Barati.
+
+        The automagically generated module map file for JSC will
+        include headers where they may not work out of the box.
+        This patch makes it so we now export the same modulemap
+        that used to be provided via the legacy system.
+
+        * Configurations/JavaScriptCore.xcconfig:
+        * JavaScriptCore.modulemap: Added.
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+
 2018-10-29  Tim Horton  <timothy_horton@apple.com>
 
         Modernize WebKit nibs and lprojs for localization's sake
index e828a75..a36d9c7 100644 (file)
@@ -25,6 +25,7 @@
 #include "Version.xcconfig"
 
 DEFINES_MODULE = YES;
+MODULEMAP_FILE = $(SRCROOT)/JavaScriptCore.modulemap;
 
 // Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
 OTHER_LDFLAGS_HIDE_SYMBOLS = -Wl,-unexported_symbol,__ZTISt9bad_alloc -Wl,-unexported_symbol,__ZTISt9exception -Wl,-unexported_symbol,__ZTSSt9bad_alloc -Wl,-unexported_symbol,__ZTSSt9exception -Wl,-unexported_symbol,__ZdlPvS_ -Wl,-unexported_symbol,__ZnwmPv -Wl,-unexported_symbol,__ZNKSt3__18functionIFvvEEclEv -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEEC1EOS2_ -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEEC2EOS2_ -Wl,-unexported_symbol,__ZNKSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEEclES3_S5_ -Wl,-unexported_symbol,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED1Ev -Wl,-unexported_symbol,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED2Ev -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEED1Ev -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEED2Ev -Wl,-unexported_symbol,__ZTVNSt3__117bad_function_callE;
diff --git a/Source/JavaScriptCore/JavaScriptCore.modulemap b/Source/JavaScriptCore/JavaScriptCore.modulemap
new file mode 100644 (file)
index 0000000..6e9cdcd
--- /dev/null
@@ -0,0 +1,18 @@
+framework module JavaScriptCore {
+  umbrella header "JavaScriptCore.h"
+
+  export *
+  module * {
+    export *
+  }
+
+  explicit module JSVirtualMachine {
+    // FIXME: 32-bit x86 is a poor way to say "fragile Objective-C ABI"
+    requires x86_32
+    exclude header "JSValue.h"
+    exclude header "JSContext.h"
+    exclude header "JSExport.h"
+    exclude header "JSManagedValue.h"
+    exclude header "JSVirtualMachine.h"
+  }
+}
index b1f291d..c3878e1 100644 (file)
                531374BC1D5CE67600AF7A0B /* WasmPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmPlan.h; sourceTree = "<group>"; };
                531374BE1D5CE95000AF7A0B /* WasmPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WasmPlan.cpp; sourceTree = "<group>"; };
                531D4E191F59CDD200EC836C /* testapi.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = testapi.cpp; path = API/tests/testapi.cpp; sourceTree = "<group>"; };
+               532631B3218777A5007B8191 /* JavaScriptCore.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = JavaScriptCore.modulemap; sourceTree = "<group>"; };
                533B15DE1DC7F463004D500A /* WasmOps.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmOps.h; sourceTree = "<group>"; };
                5341FC6F1DAC33E500E7E4D7 /* B3WasmBoundsCheckValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3WasmBoundsCheckValue.cpp; path = b3/B3WasmBoundsCheckValue.cpp; sourceTree = "<group>"; };
                5341FC711DAC343C00E7E4D7 /* B3WasmBoundsCheckValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3WasmBoundsCheckValue.h; path = b3/B3WasmBoundsCheckValue.h; sourceTree = "<group>"; };
                                8604F4F2143A6C4400B295F5 /* ChangeLog */,
                                F68EBB8C0255D4C601FF60F7 /* config.h */,
                                F692A8540255597D01FF60F7 /* create_hash_table */,
+                               532631B3218777A5007B8191 /* JavaScriptCore.modulemap */,
                                937B63CC09E766D200A671DD /* DerivedSources.make */,
                                0F93275A1C20BCDF00CF6564 /* dynbench.cpp */,
                                F5C290E60284F98E018635CA /* JavaScriptCorePrefix.h */,