WebKit Bugzilla
Attachment 343792 Details for
Bug 187133
: Switch OS(FUCHSIA) to using JSCOnly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187133-20180627213400.patch (text/plain), 10.06 KB, created by
Adam Barth
on 2018-06-27 21:34:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Adam Barth
Created:
2018-06-27 21:34:00 PDT
Size:
10.06 KB
patch
obsolete
>Index: ChangeLog >=================================================================== >--- ChangeLog (revision 233297) >+++ ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2018-06-27 Adam Barth <abarth@webkit.org> >+ >+ Switch OS(FUCHSIA) to using JSCOnly >+ https://bugs.webkit.org/show_bug.cgi?id=187133 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rather than creating a Fuchsia port, OS(FUCHSIA) now uses the JSCOnly >+ port. >+ >+ * CMakeLists.txt: Set the WTF_OS_FUCHSIA flag >+ * Source/cmake/OptionsFuchsia.cmake: Removed. >+ * Source/cmake/OptionsJSCOnly.cmake: Temporarily disable ICU for >+ OS(FUCHSIA). We'll get ICU wired in, but I'd like to work through the >+ other compile errors first. >+ > 2018-06-27 Adam Barth <abarth@webkit.org> > > Add Fuchsia support to build-jsc >Index: CMakeLists.txt >=================================================================== >--- CMakeLists.txt (revision 233297) >+++ CMakeLists.txt (working copy) >@@ -37,7 +37,6 @@ endif () > set(ALL_PORTS > AppleWin > Efl >- Fuchsia > GTK > JSCOnly > Mac >@@ -115,6 +114,8 @@ if (UNIX) > endif () > elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") > set(WTF_OS_WINDOWS 1) >+elseif (CMAKE_SYSTEM_NAME MATCHES "Fuchsia") >+ set(WTF_OS_FUCHSIA 1) > else () > message(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'") > endif () >Index: Source/cmake/OptionsFuchsia.cmake >=================================================================== >--- Source/cmake/OptionsFuchsia.cmake (revision 233297) >+++ Source/cmake/OptionsFuchsia.cmake (nonexistent) >@@ -1,29 +0,0 @@ >-set(PROJECT_VERSION_MAJOR 1) >-set(PROJECT_VERSION_MINOR 0) >-set(PROJECT_VERSION_MICRO 0) >-set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_MICRO}) >- >-set(CMAKE_SYSTEM_NAME Fuchsia) >- >-if (WTF_CPU_ARM64) >- set(triple aarch64-unknown-fuchsia) >-elseif (WTF_CPU_X86_64) >- set(triple x86_64-unknown-fuchsia) >-else () >- message(FATAL_ERROR "Unknown ARCH '${CMAKE_SYSTEM_PROCESSOR}'") >-endif () >- >-set(CMAKE_C_COMPILER_TARGET ${triple}) >-set(CMAKE_CXX_COMPILER_TARGET ${triple}) >- >-WEBKIT_OPTION_BEGIN() >-WEBKIT_OPTION_DEFINE(ENABLE_STATIC_JSC "Whether to build JavaScriptCore as a static library." PUBLIC OFF) >-WEBKIT_OPTION_END() >- >-set(ENABLE_WEBCORE OFF) >-set(ENABLE_WEBKIT_LEGACY OFF) >-set(ENABLE_WEBKIT OFF) >-set(ENABLE_API_TESTS OFF) >- >-SET_AND_EXPOSE_TO_BUILD(USE_GENERIC_EVENT_LOOP 1) >-SET_AND_EXPOSE_TO_BUILD(WTF_DEFAULT_EVENT_LOOP 0) >Index: Source/cmake/OptionsJSCOnly.cmake >=================================================================== >--- Source/cmake/OptionsJSCOnly.cmake (revision 233297) >+++ Source/cmake/OptionsJSCOnly.cmake (working copy) >@@ -97,7 +97,10 @@ else () > endif () > > if (NOT APPLE) >- find_package(ICU REQUIRED) >+ if (NOT WTF_OS_FUCHSIA) >+ # TODO: Add ICU on Fuchsia. >+ find_package(ICU REQUIRED) >+ endif () > else () > add_definitions(-DU_DISABLE_RENAMING=1 -DU_SHOW_CPLUSPLUS_API=0) > set(ICU_LIBRARIES libicucore.dylib) >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 233300) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,25 @@ >+2018-06-27 Adam Barth <abarth@webkit.org> >+ >+ Switch OS(FUCHSIA) to using JSCOnly >+ https://bugs.webkit.org/show_bug.cgi?id=187133 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Switch Fuchsia from being a port to just being an OS. We now use a >+ CMAKE_TOOLCHAIN_FILE to configure the toolchain and the target triple. >+ >+ * Scripts/webkitdirs.pm: >+ (determineSourceDir): >+ (determineXcodeSDK): >+ (findMatchingArguments): >+ (determinePortName): >+ (determineIfTargetingFuchsia): >+ (isFuchsia): >+ (setupAppleWinEnv): >+ (generateBuildSystemFromCMakeProject): >+ (relaunchIOSSimulator): >+ (debugMiniBrowser): >+ > 2018-06-27 Daniel Bates <dabates@apple.com> > > Add some tests for lldb_webkit.py >Index: Tools/Scripts/webkitdirs.pm >=================================================================== >--- Tools/Scripts/webkitdirs.pm (revision 233297) >+++ Tools/Scripts/webkitdirs.pm (working copy) >@@ -8,13 +8,13 @@ > # are met: > # > # 1. Redistributions of source code must retain the above copyright >-# notice, this list of conditions and the following disclaimer. >+# notice, this list of conditions and the following disclaimer. > # 2. Redistributions in binary form must reproduce the above copyright > # notice, this list of conditions and the following disclaimer in the >-# documentation and/or other materials provided with the distribution. >+# documentation and/or other materials provided with the distribution. > # 3. Neither the name of Apple Inc. ("Apple") nor the names of > # its contributors may be used to endorse or promote products derived >-# from this software without specific prior written permission. >+# from this software without specific prior written permission. > # > # THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY > # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >@@ -104,7 +104,6 @@ BEGIN { > # Ports > use constant { > AppleWin => "AppleWin", >- Fuchsia => "Fuchsia", > GTK => "GTK", > iOS => "iOS", > tvOS => "tvOS", >@@ -150,6 +149,7 @@ my $shouldBuild32Bit; > my $isWin64; > my $isInspectorFrontend; > my $portName; >+my $targetingFuchsia; > my $shouldUseGuardMalloc; > my $shouldNotUseNinja; > my $xcodeVersion; >@@ -195,7 +195,7 @@ sub determineSourceDir > $sourceDir = $FindBin::Bin; > $sourceDir =~ s|/+$||; # Remove trailing '/' as we would die later > >- # walks up path checking each directory to see if it is the main WebKit project dir, >+ # walks up path checking each directory to see if it is the main WebKit project dir, > # defined by containing Sources, WebCore, and JavaScriptCore. > until ((-d File::Spec->catdir($sourceDir, "Source") && -d File::Spec->catdir($sourceDir, "Source", "WebCore") && -d File::Spec->catdir($sourceDir, "Source", "JavaScriptCore")) || (-d File::Spec->catdir($sourceDir, "Internal") && -d File::Spec->catdir($sourceDir, "OpenSource"))) > { >@@ -537,7 +537,7 @@ sub determineXcodeSDK > { > return if defined $xcodeSDK; > my $sdk; >- >+ > # The user explicitly specified the sdk, don't assume anything > if (checkForArgumentAndRemoveFromARGVGettingValue("--sdk", \$sdk)) { > $xcodeSDK = $sdk; >@@ -562,7 +562,7 @@ sub determineXcodeSDK > $xcodeSDK ||= "watchsimulator"; > } > return if !defined $xcodeSDK; >- >+ > # Prefer the internal version of an sdk, if it exists. > my @availableSDKs = availableXcodeSDKs(); > >@@ -1160,7 +1160,7 @@ sub findMatchingArguments($$) > push(@matchingIndices, $index); > } > } >- return @matchingIndices; >+ return @matchingIndices; > } > > sub hasArgument($$) >@@ -1191,7 +1191,6 @@ sub determinePortName() > return if defined $portName; > > my %argToPortName = ( >- fuchsia => Fuchsia, > gtk => GTK, > 'jsc-only' => JSCOnly, > wincairo => WinCairo, >@@ -1247,9 +1246,16 @@ sub portName() > return $portName; > } > >+sub determineIfTargetingFuchsia() >+{ >+ return if defined $targetingFuchsia; >+ $targetingFuchsia = checkForArgumentAndRemoveFromARGV("--fuchsia"); >+} >+ > sub isFuchsia() > { >- return portName() eq Fuchsia; >+ determineIfTargetingFuchsia(); >+ return $targetingFuchsia; > } > > sub isGtk() >@@ -1812,7 +1818,7 @@ sub setupAppleWinEnv() > my $restartNeeded = 0; > my %variablesToSet = (); > >- # FIXME: We should remove this explicit version check for cygwin once we stop supporting Cygwin 1.7.9 or older versions. >+ # FIXME: We should remove this explicit version check for cygwin once we stop supporting Cygwin 1.7.9 or older versions. > # https://bugs.webkit.org/show_bug.cgi?id=85791 > my $uname_version = (POSIX::uname())[2]; > $uname_version =~ s/\(.*\)//; # Remove the trailing cygwin version, if any. >@@ -1822,7 +1828,7 @@ sub setupAppleWinEnv() > # for UNIX-like ttys in the Windows console > $variablesToSet{CYGWIN} = "tty" unless $ENV{CYGWIN}; > } >- >+ > # Those environment variables must be set to be able to build inside Visual Studio. > $variablesToSet{WEBKIT_LIBRARIES} = windowsLibrariesDir() unless $ENV{WEBKIT_LIBRARIES}; > $variablesToSet{WEBKIT_OUTPUTDIR} = windowsOutputDir() unless $ENV{WEBKIT_OUTPUTDIR}; >@@ -2200,6 +2206,11 @@ sub generateBuildSystemFromCMakeProject > push @args, "-DCMAKE_BUILD_TYPE=Debug"; > } > >+ my $toolchainFile = $ENV{'CMAKE_TOOLCHAIN_FILE'}; >+ if ($toolchainFile) { >+ push @args, "-DCMAKE_TOOLCHAIN_FILE=$toolchainFile"; >+ } >+ > if ($willUseNinja) { > push @args, "-G"; > if (canUseEclipseNinjaGenerator()) { >@@ -2529,9 +2540,9 @@ sub relaunchIOSSimulator($) > quitIOSSimulator($simulatedDevice->{UDID}); > > # FIXME: <rdar://problem/20916140> Switch to using CoreSimulator.framework for launching and quitting iOS Simulator >- chomp(my $developerDirectory = $ENV{DEVELOPER_DIR} || `xcode-select --print-path`); >- my $iosSimulatorPath = File::Spec->catfile($developerDirectory, "Applications", "Simulator.app"); >- system("open", "-a", $iosSimulatorPath, "--args", "-CurrentDeviceUDID", $simulatedDevice->{UDID}) == 0 or die "Failed to open $iosSimulatorPath: $!"; >+ chomp(my $developerDirectory = $ENV{DEVELOPER_DIR} || `xcode-select --print-path`); >+ my $iosSimulatorPath = File::Spec->catfile($developerDirectory, "Applications", "Simulator.app"); >+ system("open", "-a", $iosSimulatorPath, "--args", "-CurrentDeviceUDID", $simulatedDevice->{UDID}) == 0 or die "Failed to open $iosSimulatorPath: $!"; > > waitUntilIOSSimulatorDeviceIsInState($simulatedDevice->{UDID}, SIMULATOR_DEVICE_STATE_BOOTED); > waitUntilProcessNotRunning("com.apple.datamigrator"); >@@ -2817,7 +2828,7 @@ sub debugMiniBrowser > if (isAppleMacWebKit()) { > execMacWebKitAppForDebugging(File::Spec->catfile(productDir(), "MiniBrowser.app", "Contents", "MacOS", "MiniBrowser")); > } >- >+ > return 1; > } >
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 187133
:
343792
|
343797
|
343799