webkit2gtk: update to 2.25.4, refactor template, enable debug

Additionally, gold is now always off (there was no point in
keeping it on and we don't ship it in cross compilers so it
was complicating the overall logic).

JIT is also now off for ARMv6. Upstream seems to have dropped it.

[ci skip]
This commit is contained in:
q66 2019-08-26 15:53:54 +02:00 committed by Helmut Pozimski
parent 0119e263b8
commit 4cab13d461
5 changed files with 166 additions and 499 deletions

View file

@ -1,14 +0,0 @@
--- Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp.orig 2017-09-14 10:03:40.908890971 +0200
+++ Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp 2017-09-14 10:04:17.084859537 +0200
@@ -112,7 +112,11 @@ void unregisterCode(void* start, void* e
bool fastMemoryEnabled()
{
+#if ENABLE(WEBASSEMBLY_FAST_MEMORY)
return fastHandlerInstalled;
+#else
+ return false;
+#endif // ENABLE(WEBASSEMBLY_FAST_MEMORY)
}
void enableFastMemory()

View file

@ -1,10 +1,12 @@
Source: @pullmoll
Upstream: Alpine Linux
Source: @q66, @pullmoll
Original upstream: Alpine Linux
Reason: fixing machine context access for musl libc; reduce stack/heap usage for jsc; fix some overly restrictive __GLIBC__ checks
--- Source/JavaScriptCore/runtime/MachineContext..orig 2018-08-10 08:48:05.000000000 +0200
+++ Source/JavaScriptCore/runtime/MachineContext.h 2018-09-17 12:16:41.030618109 +0200
@@ -188,7 +188,7 @@
Updated for latest webkit2gtk.
--- Source/JavaScriptCore/runtime/MachineContext.h
+++ Source/JavaScriptCore/runtime/MachineContext.h
@@ -188,7 +188,7 @@ static inline void*& stackPointerImpl(mcontext_t& machineContext)
#error Unknown Architecture
#endif
@ -13,7 +15,7 @@ Reason: fixing machine context access for musl libc; reduce stack/heap usage for
#if CPU(X86)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[REG_ESP]);
@@ -335,7 +335,7 @@
@@ -335,7 +335,7 @@ static inline void*& framePointerImpl(mcontext_t& machineContext)
#error Unknown Architecture
#endif
@ -22,7 +24,7 @@ Reason: fixing machine context access for musl libc; reduce stack/heap usage for
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -482,7 +482,7 @@
@@ -482,7 +482,7 @@ static inline void*& instructionPointerImpl(mcontext_t& machineContext)
#error Unknown Architecture
#endif
@ -31,7 +33,7 @@ Reason: fixing machine context access for musl libc; reduce stack/heap usage for
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -639,7 +639,7 @@
@@ -639,7 +639,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext)
#error Unknown Architecture
#endif
@ -40,7 +42,7 @@ Reason: fixing machine context access for musl libc; reduce stack/heap usage for
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
@@ -756,7 +756,7 @@
@@ -756,7 +756,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext)
#error Unknown Architecture
#endif
@ -49,447 +51,71 @@ Reason: fixing machine context access for musl libc; reduce stack/heap usage for
// The following sequence depends on glibc's sys/ucontext.h.
#if CPU(X86)
--- Source/JavaScriptCore/runtime/Options.h.orig 2018-08-22 10:15:13.000000000 +0200
+++ Source/JavaScriptCore/runtime/Options.h 2018-09-17 15:22:16.044174123 +0200
@@ -130,6 +130,7 @@
--- Source/JavaScriptCore/runtime/Options.h
+++ Source/JavaScriptCore/runtime/Options.h
@@ -112,6 +112,16 @@ constexpr bool enableWebAssemblyStreamingApi = true;
constexpr bool enableWebAssemblyStreamingApi = false;
#endif
+#if defined(__GLIBC__)
+constexpr unsigned jscMaxPerThreadStack = 4 * MB;
+constexpr unsigned jscSoftReservedZoneSize = 128 * KB;
+constexpr unsigned jscReservedZoneSize = 64 * KB;
+#else
+constexpr unsigned jscMaxPerThreadStack = 80 * KB;
+constexpr unsigned jscSoftReservedZoneSize = 32 * KB;
+constexpr unsigned jscReservedZoneSize = 16 * KB;
+#endif
+
#define JSC_OPTIONS(v) \
v(bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \
v(unsigned, dumpOptions, 0, Normal, "dumps JSC options (0 = None, 1 = Overridden only, 2 = All, 3 = Verbose)") \
@@ -516,6 +517,397 @@
v(bool, traceLLIntExecution, false, Configurable, nullptr) \
v(bool, traceLLIntSlowPath, false, Configurable, nullptr) \
+#else /* defined(__GLIBC__) */
+
+#define JSC_OPTIONS(v) \
+ v(bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \
+ v(unsigned, dumpOptions, 0, Normal, "dumps JSC options (0 = None, 1 = Overridden only, 2 = All, 3 = Verbose)") \
+ v(optionString, configFile, nullptr, Normal, "file to configure JSC options and logging location") \
+ \
+ v(bool, useLLInt, true, Normal, "allows the LLINT to be used if true") \
+ v(bool, useJIT, jitEnabledByDefault(), Normal, "allows the executable pages to be allocated for JIT and thunks if true") \
+ v(bool, useBaselineJIT, true, Normal, "allows the baseline JIT to be used if true") \
+ v(bool, useDFGJIT, true, Normal, "allows the DFG JIT to be used if true") \
+ v(bool, useRegExpJIT, jitEnabledByDefault(), Normal, "allows the RegExp JIT to be used if true") \
+ v(bool, useDOMJIT, is64Bit(), Normal, "allows the DOMJIT to be used if true") \
+ \
+ v(bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \
+ \
+ v(unsigned, maxPerThreadStackUsage, 80 * KB, Normal, "Max allowed stack usage by the VM") \
+ v(unsigned, softReservedZoneSize, 32 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
+ v(unsigned, reservedZoneSize, 16 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \
+ \
+ v(bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \
+ v(unsigned, jitMemoryReservationSize, 0, Normal, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \
+ v(bool, useSeparatedWXHeap, false, Normal, nullptr) \
+ \
+ v(bool, forceCodeBlockLiveness, false, Normal, nullptr) \
+ v(bool, forceICFailure, false, Normal, nullptr) \
+ \
+ v(unsigned, repatchCountForCoolDown, 8, Normal, nullptr) \
+ v(unsigned, initialCoolDownCount, 20, Normal, nullptr) \
+ v(unsigned, repatchBufferingCountdown, 8, Normal, nullptr) \
+ \
+ v(bool, dumpGeneratedBytecodes, false, Normal, nullptr) \
+ v(bool, dumpBytecodeLivenessResults, false, Normal, nullptr) \
+ v(bool, validateBytecode, false, Normal, nullptr) \
+ v(bool, forceDebuggerBytecodeGeneration, false, Normal, nullptr) \
+ v(bool, dumpBytecodesBeforeGeneratorification, false, Normal, nullptr) \
+ \
+ v(bool, useFunctionDotArguments, true, Normal, nullptr) \
+ v(bool, useTailCalls, true, Normal, nullptr) \
+ v(bool, optimizeRecursiveTailCalls, true, Normal, nullptr) \
+ v(bool, alwaysUseShadowChicken, false, Normal, nullptr) \
+ v(unsigned, shadowChickenLogSize, 1000, Normal, nullptr) \
+ v(unsigned, shadowChickenMaxTailDeletedFramesSize, 128, Normal, nullptr) \
+ \
+ /* dumpDisassembly implies dumpDFGDisassembly. */ \
+ v(bool, dumpDisassembly, false, Normal, "dumps disassembly of all JIT compiled code upon compilation") \
+ v(bool, asyncDisassembly, false, Normal, nullptr) \
+ v(bool, dumpDFGDisassembly, false, Normal, "dumps disassembly of DFG function upon compilation") \
+ v(bool, dumpFTLDisassembly, false, Normal, "dumps disassembly of FTL function upon compilation") \
+ v(bool, dumpRegExpDisassembly, false, Normal, "dumps disassembly of RegExp upon compilation") \
+ v(bool, dumpAllDFGNodes, false, Normal, nullptr) \
+ v(bool, logJITCodeForPerf, false, Configurable, nullptr) \
+ v(optionRange, bytecodeRangeToJITCompile, 0, Normal, "bytecode size range to allow compilation on, e.g. 1:100") \
+ v(optionRange, bytecodeRangeToDFGCompile, 0, Normal, "bytecode size range to allow DFG compilation on, e.g. 1:100") \
+ v(optionRange, bytecodeRangeToFTLCompile, 0, Normal, "bytecode size range to allow FTL compilation on, e.g. 1:100") \
+ v(optionString, jitWhitelist, nullptr, Normal, "file with list of function signatures to allow compilation on") \
+ v(optionString, dfgWhitelist, nullptr, Normal, "file with list of function signatures to allow DFG compilation on") \
+ v(optionString, ftlWhitelist, nullptr, Normal, "file with list of function signatures to allow FTL compilation on") \
+ v(bool, dumpSourceAtDFGTime, false, Normal, "dumps source code of JS function being DFG compiled") \
+ v(bool, dumpBytecodeAtDFGTime, false, Normal, "dumps bytecode of JS function being DFG compiled") \
+ v(bool, dumpGraphAfterParsing, false, Normal, nullptr) \
+ v(bool, dumpGraphAtEachPhase, false, Normal, nullptr) \
+ v(bool, dumpDFGGraphAtEachPhase, false, Normal, "dumps the DFG graph at each phase of DFG compilation (note this excludes DFG graphs during FTL compilation)") \
+ v(bool, dumpDFGFTLGraphAtEachPhase, false, Normal, "dumps the DFG graph at each phase of DFG compilation when compiling FTL code") \
+ v(bool, dumpB3GraphAtEachPhase, false, Normal, "dumps the B3 graph at each phase of compilation") \
+ v(bool, dumpAirGraphAtEachPhase, false, Normal, "dumps the Air graph at each phase of compilation") \
+ v(bool, verboseDFGBytecodeParsing, false, Normal, nullptr) \
+ v(bool, safepointBeforeEachPhase, true, Normal, nullptr) \
+ v(bool, verboseCompilation, false, Normal, nullptr) \
+ v(bool, verboseFTLCompilation, false, Normal, nullptr) \
+ v(bool, logCompilationChanges, false, Normal, nullptr) \
+ v(bool, useProbeOSRExit, false, Normal, nullptr) \
+ v(bool, printEachOSRExit, false, Normal, nullptr) \
+ v(bool, validateGraph, false, Normal, nullptr) \
+ v(bool, validateGraphAtEachPhase, false, Normal, nullptr) \
+ v(bool, verboseValidationFailure, false, Normal, nullptr) \
+ v(bool, verboseOSR, false, Normal, nullptr) \
+ v(bool, verboseDFGOSRExit, false, Normal, nullptr) \
+ v(bool, verboseFTLOSRExit, false, Normal, nullptr) \
+ v(bool, verboseCallLink, false, Normal, nullptr) \
+ v(bool, verboseCompilationQueue, false, Normal, nullptr) \
+ v(bool, reportCompileTimes, false, Normal, "dumps JS function signature and the time it took to compile in all tiers") \
+ v(bool, reportBaselineCompileTimes, false, Normal, "dumps JS function signature and the time it took to BaselineJIT compile") \
+ v(bool, reportDFGCompileTimes, false, Normal, "dumps JS function signature and the time it took to DFG and FTL compile") \
+ v(bool, reportFTLCompileTimes, false, Normal, "dumps JS function signature and the time it took to FTL compile") \
+ v(bool, reportTotalCompileTimes, false, Normal, nullptr) \
+ v(bool, reportParseTimes, false, Normal, "dumps JS function signature and the time it took to parse") \
+ v(bool, reportBytecodeCompileTimes, false, Normal, "dumps JS function signature and the time it took to bytecode compile") \
+ v(bool, verboseExitProfile, false, Normal, nullptr) \
+ v(bool, verboseCFA, false, Normal, nullptr) \
+ v(bool, verboseDFGFailure, false, Normal, nullptr) \
+ v(bool, verboseFTLToJSThunk, false, Normal, nullptr) \
+ v(bool, verboseFTLFailure, false, Normal, nullptr) \
+ v(bool, alwaysComputeHash, false, Normal, nullptr) \
+ v(bool, testTheFTL, false, Normal, nullptr) \
+ v(bool, verboseSanitizeStack, false, Normal, nullptr) \
+ v(bool, useGenerationalGC, true, Normal, nullptr) \
+ v(bool, useConcurrentBarriers, true, Normal, nullptr) \
+ v(bool, useConcurrentGC, true, Normal, nullptr) \
+ v(bool, collectContinuously, false, Normal, nullptr) \
+ v(double, collectContinuouslyPeriodMS, 1, Normal, nullptr) \
+ v(bool, forceFencedBarrier, false, Normal, nullptr) \
+ v(bool, verboseVisitRace, false, Normal, nullptr) \
+ v(bool, optimizeParallelSlotVisitorsForStoppedMutator, false, Normal, nullptr) \
+ v(unsigned, largeHeapSize, 32 * 1024 * 1024, Normal, nullptr) \
+ v(unsigned, smallHeapSize, 1 * 1024 * 1024, Normal, nullptr) \
+ v(double, smallHeapRAMFraction, 0.25, Normal, nullptr) \
+ v(double, smallHeapGrowthFactor, 2, Normal, nullptr) \
+ v(double, mediumHeapRAMFraction, 0.5, Normal, nullptr) \
+ v(double, mediumHeapGrowthFactor, 1.5, Normal, nullptr) \
+ v(double, largeHeapGrowthFactor, 1.24, Normal, nullptr) \
+ v(double, miniVMHeapGrowthFactor, 1.27, Normal, nullptr) \
+ v(double, criticalGCMemoryThreshold, 0.80, Normal, "percent memory in use the GC considers critical. The collector is much more aggressive above this threshold") \
+ v(double, minimumMutatorUtilization, 0, Normal, nullptr) \
+ v(double, maximumMutatorUtilization, 0.7, Normal, nullptr) \
+ v(double, epsilonMutatorUtilization, 0.01, Normal, nullptr) \
+ v(double, concurrentGCMaxHeadroom, 1.5, Normal, nullptr) \
+ v(double, concurrentGCPeriodMS, 2, Normal, nullptr) \
+ v(bool, useStochasticMutatorScheduler, true, Normal, nullptr) \
+ v(double, minimumGCPauseMS, 0.3, Normal, nullptr) \
+ v(double, gcPauseScale, 0.3, Normal, nullptr) \
+ v(double, gcIncrementBytes, 10000, Normal, nullptr) \
+ v(double, gcIncrementMaxBytes, 100000, Normal, nullptr) \
+ v(double, gcIncrementScale, 0, Normal, nullptr) \
+ v(bool, scribbleFreeCells, false, Normal, nullptr) \
+ v(double, sizeClassProgression, 1.4, Normal, nullptr) \
+ v(unsigned, largeAllocationCutoff, 100000, Normal, nullptr) \
+ v(bool, dumpSizeClasses, false, Normal, nullptr) \
+ v(bool, useBumpAllocator, true, Normal, nullptr) \
+ v(bool, stealEmptyBlocksFromOtherAllocators, true, Normal, nullptr) \
+ v(bool, tradeDestructorBlocks, true, Normal, nullptr) \
+ v(bool, eagerlyUpdateTopCallFrame, false, Normal, nullptr) \
+ \
+ v(bool, useOSREntryToDFG, true, Normal, nullptr) \
+ v(bool, useOSREntryToFTL, true, Normal, nullptr) \
+ \
+ v(bool, useFTLJIT, true, Normal, "allows the FTL JIT to be used if true") \
+ v(bool, useFTLTBAA, true, Normal, nullptr) \
+ v(bool, validateFTLOSRExitLiveness, false, Normal, nullptr) \
+ v(unsigned, defaultB3OptLevel, 2, Normal, nullptr) \
+ v(bool, b3AlwaysFailsBeforeCompile, false, Normal, nullptr) \
+ v(bool, b3AlwaysFailsBeforeLink, false, Normal, nullptr) \
+ v(bool, ftlCrashes, false, Normal, nullptr) /* fool-proof way of checking that you ended up in the FTL. ;-) */\
+ v(bool, clobberAllRegsInFTLICSlowPath, !ASSERT_DISABLED, Normal, nullptr) \
+ v(bool, enableJITDebugAssertions, !ASSERT_DISABLED, Normal, nullptr) \
+ v(bool, useAccessInlining, true, Normal, nullptr) \
+ v(unsigned, maxAccessVariantListSize, 8, Normal, nullptr) \
+ v(bool, usePolyvariantDevirtualization, true, Normal, nullptr) \
+ v(bool, usePolymorphicAccessInlining, true, Normal, nullptr) \
+ v(unsigned, maxPolymorphicAccessInliningListSize, 8, Normal, nullptr) \
+ v(bool, usePolymorphicCallInlining, true, Normal, nullptr) \
+ v(bool, usePolymorphicCallInliningForNonStubStatus, false, Normal, nullptr) \
+ v(unsigned, maxPolymorphicCallVariantListSize, 15, Normal, nullptr) \
+ v(unsigned, maxPolymorphicCallVariantListSizeForTopTier, 5, Normal, nullptr) \
+ v(unsigned, maxPolymorphicCallVariantListSizeForWebAssemblyToJS, 5, Normal, nullptr) \
+ v(unsigned, maxPolymorphicCallVariantsForInlining, 5, Normal, nullptr) \
+ v(unsigned, frequentCallThreshold, 2, Normal, nullptr) \
+ v(double, minimumCallToKnownRate, 0.51, Normal, nullptr) \
+ v(bool, createPreHeaders, true, Normal, nullptr) \
+ v(bool, useMovHintRemoval, true, Normal, nullptr) \
+ v(bool, usePutStackSinking, true, Normal, nullptr) \
+ v(bool, useObjectAllocationSinking, true, Normal, nullptr) \
+ v(bool, useArityFixupInlining, true, Normal, nullptr) \
+ v(bool, logExecutableAllocation, false, Normal, nullptr) \
+ \
+ v(bool, useConcurrentJIT, true, Normal, "allows the DFG / FTL compilation in threads other than the executing JS thread") \
+ v(unsigned, numberOfDFGCompilerThreads, computeNumberOfWorkerThreads(3, 2) - 1, Normal, nullptr) \
+ v(unsigned, numberOfFTLCompilerThreads, computeNumberOfWorkerThreads(MAXIMUM_NUMBER_OF_FTL_COMPILER_THREADS, 2) - 1, Normal, nullptr) \
+ v(int32, priorityDeltaOfDFGCompilerThreads, computePriorityDeltaOfWorkerThreads(-1, 0), Normal, nullptr) \
+ v(int32, priorityDeltaOfFTLCompilerThreads, computePriorityDeltaOfWorkerThreads(-2, 0), Normal, nullptr) \
+ v(int32, priorityDeltaOfWasmCompilerThreads, computePriorityDeltaOfWorkerThreads(-1, 0), Normal, nullptr) \
+ \
+ v(bool, useProfiler, false, Normal, nullptr) \
+ v(bool, disassembleBaselineForProfiler, true, Normal, nullptr) \
+ \
+ v(bool, useArchitectureSpecificOptimizations, true, Normal, nullptr) \
+ \
+ v(bool, breakOnThrow, false, Normal, nullptr) \
+ \
+ v(unsigned, maximumOptimizationCandidateInstructionCount, 100000, Normal, nullptr) \
+ \
+ v(unsigned, maximumFunctionForCallInlineCandidateInstructionCount, 190, Normal, nullptr) \
+ v(unsigned, maximumFunctionForClosureCallInlineCandidateInstructionCount, 100, Normal, nullptr) \
+ v(unsigned, maximumFunctionForConstructInlineCandidateInstructionCount, 100, Normal, nullptr) \
+ \
+ v(unsigned, maximumFTLCandidateInstructionCount, 20000, Normal, nullptr) \
+ \
+ /* Depth of inline stack, so 1 = no inlining, 2 = one level, etc. */ \
+ v(unsigned, maximumInliningDepth, 5, Normal, "maximum allowed inlining depth. Depth of 1 means no inlining") \
+ v(unsigned, maximumInliningRecursion, 2, Normal, nullptr) \
+ \
+ /* Maximum size of a caller for enabling inlining. This is purely to protect us */\
+ /* from super long compiles that take a lot of memory. */\
+ v(unsigned, maximumInliningCallerSize, 10000, Normal, nullptr) \
+ \
+ v(unsigned, maximumVarargsForInlining, 100, Normal, nullptr) \
+ \
+ v(bool, useMaximalFlushInsertionPhase, false, Normal, "Setting to true allows the DFG's MaximalFlushInsertionPhase to run.") \
+ \
+ v(unsigned, maximumBinaryStringSwitchCaseLength, 50, Normal, nullptr) \
+ v(unsigned, maximumBinaryStringSwitchTotalLength, 2000, Normal, nullptr) \
+ \
+ v(double, jitPolicyScale, 1.0, Normal, "scale JIT thresholds to this specified ratio between 0.0 (compile ASAP) and 1.0 (compile like normal).") \
+ v(bool, forceEagerCompilation, false, Normal, nullptr) \
+ v(int32, thresholdForJITAfterWarmUp, 500, Normal, nullptr) \
+ v(int32, thresholdForJITSoon, 100, Normal, nullptr) \
+ \
+ v(int32, thresholdForOptimizeAfterWarmUp, 1000, Normal, nullptr) \
+ v(int32, thresholdForOptimizeAfterLongWarmUp, 1000, Normal, nullptr) \
+ v(int32, thresholdForOptimizeSoon, 1000, Normal, nullptr) \
+ v(int32, executionCounterIncrementForLoop, 1, Normal, nullptr) \
+ v(int32, executionCounterIncrementForEntry, 15, Normal, nullptr) \
+ \
+ v(int32, thresholdForFTLOptimizeAfterWarmUp, 100000, Normal, nullptr) \
+ v(int32, thresholdForFTLOptimizeSoon, 1000, Normal, nullptr) \
+ v(int32, ftlTierUpCounterIncrementForLoop, 1, Normal, nullptr) \
+ v(int32, ftlTierUpCounterIncrementForReturn, 15, Normal, nullptr) \
+ v(unsigned, ftlOSREntryFailureCountForReoptimization, 15, Normal, nullptr) \
+ v(unsigned, ftlOSREntryRetryThreshold, 100, Normal, nullptr) \
+ \
+ v(int32, evalThresholdMultiplier, 10, Normal, nullptr) \
+ v(unsigned, maximumEvalCacheableSourceLength, 256, Normal, nullptr) \
+ \
+ v(bool, randomizeExecutionCountsBetweenCheckpoints, false, Normal, nullptr) \
+ v(int32, maximumExecutionCountsBetweenCheckpointsForBaseline, 1000, Normal, nullptr) \
+ v(int32, maximumExecutionCountsBetweenCheckpointsForUpperTiers, 50000, Normal, nullptr) \
+ \
+ v(unsigned, likelyToTakeSlowCaseMinimumCount, 20, Normal, nullptr) \
+ v(unsigned, couldTakeSlowCaseMinimumCount, 10, Normal, nullptr) \
+ \
+ v(unsigned, osrExitCountForReoptimization, 100, Normal, nullptr) \
+ v(unsigned, osrExitCountForReoptimizationFromLoop, 5, Normal, nullptr) \
+ \
+ v(unsigned, reoptimizationRetryCounterMax, 0, Normal, nullptr) \
+ \
+ v(unsigned, minimumOptimizationDelay, 1, Normal, nullptr) \
+ v(unsigned, maximumOptimizationDelay, 5, Normal, nullptr) \
+ v(double, desiredProfileLivenessRate, 0.75, Normal, nullptr) \
+ v(double, desiredProfileFullnessRate, 0.35, Normal, nullptr) \
+ \
+ v(double, doubleVoteRatioForDoubleFormat, 2, Normal, nullptr) \
+ v(double, structureCheckVoteRatioForHoisting, 1, Normal, nullptr) \
+ v(double, checkArrayVoteRatioForHoisting, 1, Normal, nullptr) \
+ \
+ v(unsigned, maximumDirectCallStackSize, 200, Normal, nullptr) \
+ \
+ v(unsigned, minimumNumberOfScansBetweenRebalance, 100, Normal, nullptr) \
+ v(unsigned, numberOfGCMarkers, computeNumberOfGCMarkers(8), Normal, nullptr) \
+ v(bool, useParallelMarkingConstraintSolver, true, Normal, nullptr) \
+ v(unsigned, opaqueRootMergeThreshold, 1000, Normal, nullptr) \
+ v(double, minHeapUtilization, 0.8, Normal, nullptr) \
+ v(double, minMarkedBlockUtilization, 0.9, Normal, nullptr) \
+ v(unsigned, slowPathAllocsBetweenGCs, 0, Normal, "force a GC on every Nth slow path alloc, where N is specified by this option") \
+ \
+ v(double, percentCPUPerMBForFullTimer, 0.0003125, Normal, nullptr) \
+ v(double, percentCPUPerMBForEdenTimer, 0.0025, Normal, nullptr) \
+ v(double, collectionTimerMaxPercentCPU, 0.05, Normal, nullptr) \
+ \
+ v(bool, forceWeakRandomSeed, false, Normal, nullptr) \
+ v(unsigned, forcedWeakRandomSeed, 0, Normal, nullptr) \
+ \
+ v(bool, useZombieMode, false, Normal, "debugging option to scribble over dead objects with 0xbadbeef0") \
+ v(bool, useImmortalObjects, false, Normal, "debugging option to keep all objects alive forever") \
+ v(bool, sweepSynchronously, false, Normal, "debugging option to sweep all dead objects synchronously at GC end before resuming mutator") \
+ v(unsigned, maxSingleAllocationSize, 0, Configurable, "debugging option to limit individual allocations to a max size (0 = limit not set, N = limit size in bytes)") \
+ \
+ v(gcLogLevel, logGC, GCLogging::None, Normal, "debugging option to log GC activity (0 = None, 1 = Basic, 2 = Verbose)") \
+ v(bool, useGC, true, Normal, nullptr) \
+ v(bool, gcAtEnd, false, Normal, "If true, the jsc CLI will do a GC before exiting") \
+ v(bool, forceGCSlowPaths, false, Normal, "If true, we will force all JIT fast allocations down their slow paths.") \
+ v(unsigned, gcMaxHeapSize, 0, Normal, nullptr) \
+ v(unsigned, forceRAMSize, 0, Normal, nullptr) \
+ v(bool, recordGCPauseTimes, false, Normal, nullptr) \
+ v(bool, logHeapStatisticsAtExit, false, Normal, nullptr) \
+ v(bool, forceCodeBlockToJettisonDueToOldAge, false, Normal, "If true, this means that anytime we can jettison a CodeBlock due to old age, we do.") \
+ v(bool, useEagerCodeBlockJettisonTiming, false, Normal, "If true, the time slices for jettisoning a CodeBlock due to old age are shrunk significantly.") \
+ \
+ v(bool, useTypeProfiler, false, Normal, nullptr) \
+ v(bool, useControlFlowProfiler, false, Normal, nullptr) \
+ \
+ v(bool, useSamplingProfiler, false, Normal, nullptr) \
+ v(unsigned, sampleInterval, 1000, Normal, "Time between stack traces in microseconds.") \
+ v(bool, collectSamplingProfilerDataForJSCShell, false, Normal, "This corresponds to the JSC shell's --sample option.") \
+ v(unsigned, samplingProfilerTopFunctionsCount, 12, Normal, "Number of top functions to report when using the command line interface.") \
+ v(unsigned, samplingProfilerTopBytecodesCount, 40, Normal, "Number of top bytecodes to report when using the command line interface.") \
+ v(optionString, samplingProfilerPath, nullptr, Normal, "The path to the directory to write sampiling profiler output to. This probably will not work with WK2 unless the path is in the whitelist.") \
+ v(bool, sampleCCode, false, Normal, "Causes the sampling profiler to record profiling data for C frames.") \
+ \
+ v(bool, alwaysGeneratePCToCodeOriginMap, false, Normal, "This will make sure we always generate a PCToCodeOriginMap for JITed code.") \
+ \
+ v(bool, verifyHeap, false, Normal, nullptr) \
+ v(unsigned, numberOfGCCyclesToRecordForVerification, 3, Normal, nullptr) \
+ \
+ v(unsigned, exceptionStackTraceLimit, 100, Normal, "Stack trace limit for internal Exception object") \
+ v(unsigned, defaultErrorStackTraceLimit, 100, Normal, "The default value for Error.stackTraceLimit") \
+ v(bool, useExceptionFuzz, false, Normal, nullptr) \
+ v(unsigned, fireExceptionFuzzAt, 0, Normal, nullptr) \
+ v(bool, validateDFGExceptionHandling, false, Normal, "Causes the DFG to emit code validating exception handling for each node that can exit") /* This is true by default on Debug builds */\
+ v(bool, dumpSimulatedThrows, false, Normal, "Dumps the call stack of the last simulated throw if exception scope verification fails") \
+ v(bool, validateExceptionChecks, false, Normal, "Verifies that needed exception checks are performed.") \
+ v(unsigned, unexpectedExceptionStackTraceLimit, 100, Normal, "Stack trace limit for debugging unexpected exceptions observed in the VM") \
+ \
+ v(bool, useExecutableAllocationFuzz, false, Normal, nullptr) \
+ v(unsigned, fireExecutableAllocationFuzzAt, 0, Normal, nullptr) \
+ v(unsigned, fireExecutableAllocationFuzzAtOrAfter, 0, Normal, nullptr) \
+ v(bool, verboseExecutableAllocationFuzz, false, Normal, nullptr) \
+ \
+ v(bool, useOSRExitFuzz, false, Normal, nullptr) \
+ v(unsigned, fireOSRExitFuzzAtStatic, 0, Normal, nullptr) \
+ v(unsigned, fireOSRExitFuzzAt, 0, Normal, nullptr) \
+ v(unsigned, fireOSRExitFuzzAtOrAfter, 0, Normal, nullptr) \
+ \
+ v(bool, logPhaseTimes, false, Normal, nullptr) \
+ v(double, rareBlockPenalty, 0.001, Normal, nullptr) \
+ v(bool, airLinearScanVerbose, false, Normal, nullptr) \
+ v(bool, airLinearScanSpillsEverything, false, Normal, nullptr) \
+ v(bool, airForceBriggsAllocator, false, Normal, nullptr) \
+ v(bool, airForceIRCAllocator, false, Normal, nullptr) \
+ v(bool, airRandomizeRegs, false, Normal, nullptr) \
+ v(bool, coalesceSpillSlots, true, Normal, nullptr) \
+ v(bool, logAirRegisterPressure, false, Normal, nullptr) \
+ v(bool, useB3TailDup, true, Normal, nullptr) \
+ v(unsigned, maxB3TailDupBlockSize, 3, Normal, nullptr) \
+ v(unsigned, maxB3TailDupBlockSuccessors, 3, Normal, nullptr) \
+ \
+ v(bool, useDollarVM, false, Restricted, "installs the $vm debugging tool in global objects") \
+ v(optionString, functionOverrides, nullptr, Restricted, "file with debugging overrides for function bodies") \
+ v(bool, useSigillCrashAnalyzer, false, Configurable, "logs data about SIGILL crashes") \
+ \
+ v(unsigned, watchdog, 0, Normal, "watchdog timeout (0 = Disabled, N = a timeout period of N milliseconds)") \
+ v(bool, usePollingTraps, false, Normal, "use polling (instead of signalling) VM traps") \
+ \
+ v(bool, useMachForExceptions, true, Normal, "Use mach exceptions rather than signals to handle faults and pass thread messages. (This does nothing on platforms without mach)") \
+ \
+ v(bool, useICStats, false, Normal, nullptr) \
+ \
+ v(unsigned, prototypeHitCountForLLIntCaching, 2, Normal, "Number of prototype property hits before caching a prototype in the LLInt. A count of 0 means never cache.") \
+ \
+ v(bool, dumpCompiledRegExpPatterns, false, Normal, nullptr) \
+ \
+ v(bool, dumpModuleRecord, false, Normal, nullptr) \
+ v(bool, dumpModuleLoadingState, false, Normal, nullptr) \
+ v(bool, exposeInternalModuleLoader, false, Normal, "expose the internal module loader object to the global space for debugging") \
+ \
+ v(bool, useSuperSampler, false, Normal, nullptr) \
+ \
+ v(bool, useSourceProviderCache, true, Normal, "If false, the parser will not use the source provider cache. It's good to verify everything works when this is false. Because the cache is so successful, it can mask bugs.") \
+ v(bool, useCodeCache, true, Normal, "If false, the unlinked byte code cache will not be used.") \
+ \
+ v(bool, useWebAssembly, true, Normal, "Expose the WebAssembly global object.") \
+ \
+ v(bool, enableSpectreMitigations, true, Restricted, "Enable Spectre mitigations.") \
+ v(bool, enableSpectreGadgets, false, Restricted, "enable gadgets to test Spectre mitigations.") \
+ v(bool, zeroStackFrame, false, Normal, "Zero stack frame on entry to a function.") \
+ \
+ v(bool, failToCompileWebAssemblyCode, false, Normal, "If true, no Wasm::Plan will sucessfully compile a function.") \
+ v(size, webAssemblyPartialCompileLimit, 5000, Normal, "Limit on the number of bytes a Wasm::Plan::compile should attempt before checking for other work.") \
+ v(unsigned, webAssemblyBBQOptimizationLevel, 0, Normal, "B3 Optimization level for BBQ Web Assembly module compilations.") \
+ v(unsigned, webAssemblyOMGOptimizationLevel, Options::defaultB3OptLevel(), Normal, "B3 Optimization level for OMG Web Assembly module compilations.") \
+ \
+ v(bool, useBBQTierUpChecks, true, Normal, "Enables tier up checks for our BBQ code.") \
+ v(unsigned, webAssemblyOMGTierUpCount, 5000, Normal, "The countdown before we tier up a function to OMG.") \
+ v(unsigned, webAssemblyLoopDecrement, 15, Normal, "The amount the tier up countdown is decremented on each loop backedge.") \
+ v(unsigned, webAssemblyFunctionEntryDecrement, 1, Normal, "The amount the tier up countdown is decremented on each function entry.") \
+ \
+ /* FIXME: enable fast memories on iOS and pre-allocate them. https://bugs.webkit.org/show_bug.cgi?id=170774 */ \
+ v(bool, useWebAssemblyFastMemory, !isIOS(), Normal, "If true, we will try to use a 32-bit address space with a signal handler to bounds check wasm memory.") \
+ v(bool, logWebAssemblyMemory, false, Normal, nullptr) \
+ v(unsigned, webAssemblyFastMemoryRedzonePages, 128, Normal, "WebAssembly fast memories use 4GiB virtual allocations, plus a redzone (counted as multiple of 64KiB WebAssembly pages) at the end to catch reg+imm accesses which exceed 32-bit, anything beyond the redzone is explicitly bounds-checked") \
+ v(bool, crashIfWebAssemblyCantFastMemory, false, Normal, "If true, we will crash if we can't obtain fast memory for wasm.") \
+ v(unsigned, maxNumWebAssemblyFastMemories, 4, Normal, nullptr) \
+ v(bool, useFastTLSForWasmContext, true, Normal, "If true, we will store context in fast TLS. If false, we will pin it to a register.") \
+ v(bool, wasmBBQUsesAir, true, Normal, nullptr) \
+ v(bool, useWebAssemblyStreamingApi, enableWebAssemblyStreamingApi, Normal, "Allow to run WebAssembly's Streaming API") \
+ v(bool, useCallICsForWebAssemblyToJSCalls, true, Normal, "If true, we will use CallLinkInfo to inline cache Wasm to JS calls.") \
+ v(bool, useEagerWebAssemblyModuleHashing, false, Normal, "Unnamed WebAssembly modules are identified in backtraces through their hash, if available.") \
+ v(bool, useBigInt, false, Normal, "If true, we will enable BigInt support.") \
+ v(bool, useIntlNumberFormatToParts, enableIntlNumberFormatToParts, Normal, "If true, we will enable Intl.NumberFormat.prototype.formatToParts") \
+ v(bool, useIntlPluralRules, enableIntlPluralRules, Normal, "If true, we will enable Intl.PluralRules.") \
+ v(bool, useArrayAllocationProfiling, true, Normal, "If true, we will use our normal array allocation profiling. If false, the allocation profile will always claim to be undecided.") \
+ v(bool, forcePolyProto, false, Normal, "If true, create_this will always create an object with a poly proto structure.") \
+ v(bool, forceMiniVMMode, false, Normal, "If true, it will force mini VM mode on.") \
+ v(bool, useTracePoints, false, Normal, nullptr) \
+ v(bool, traceLLIntExecution, false, Configurable, nullptr) \
+ v(bool, traceLLIntSlowPath, false, Configurable, nullptr) \
+ v(bool, traceBaselineJITExecution, false, Normal, nullptr) \
+ v(unsigned, thresholdForGlobalLexicalBindingEpoch, UINT_MAX, Normal, "Threshold for global lexical binding epoch. If the epoch reaches to this value, CodeBlock metadata for scope operations will be revised globally. It needs to be greater than 1.") \
+ v(optionString, diskCachePath, nullptr, Restricted, nullptr) \
+ v(bool, forceDiskCache, false, Restricted, nullptr) \
+
+#endif /* !defined(__GLIBC__) */
enum OptionEquivalence {
SameOption,
--- Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp.orig 2018-04-18 08:26:39.000000000 +0200
+++ Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp 2018-09-17 15:42:30.694125692 +0200
@@ -836,7 +836,7 @@
@@ -126,9 +136,9 @@ constexpr bool enableWebAssemblyStreamingApi = false;
\
v(bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \
\
- v(unsigned, maxPerThreadStackUsage, 4 * MB, Normal, "Max allowed stack usage by the VM") \
- v(unsigned, softReservedZoneSize, 128 * KB, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
- v(unsigned, reservedZoneSize, 64 * KB, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \
+ v(unsigned, maxPerThreadStackUsage, jscMaxPerThreadStack, Normal, "Max allowed stack usage by the VM") \
+ v(unsigned, softReservedZoneSize, jscSoftReservedZoneSize, Normal, "A buffer greater than reservedZoneSize that reserves space for stringifying exceptions.") \
+ v(unsigned, reservedZoneSize, jscReservedZoneSize, Normal, "The amount of stack space we guarantee to our clients (and to interal VM code that does not call out to clients).") \
\
v(bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \
v(unsigned, jitMemoryReservationSize, 0, Normal, "Set this number to change the executable allocation size in ExecutableAllocatorFixedVMPool. (In bytes.)") \
--- Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp
+++ Source/ThirdParty/ANGLE/src/compiler/preprocessor/ExpressionParser.cpp
@@ -728,7 +728,7 @@ int yydebug;
#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
+# if defined __linux__ && defined _STRING_H
# define yystrlen strlen
# else
# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
+# if defined __linux__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
@@ -852,7 +852,7 @@
# endif
@@ -743,7 +743,7 @@ static YYSIZE_T yystrlen(const char *yystr)
# endif
# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# if defined __linux__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
--- Source/WTF/wtf/Platform.h.orig 2018-09-03 09:39:47.000000000 +0200
+++ Source/WTF/wtf/Platform.h 2018-09-17 15:45:20.959118903 +0200
@@ -697,7 +697,7 @@
#define HAVE_CFNETWORK_STORAGE_PARTITIONING 1
#endif
--- Source/WTF/wtf/Platform.h
+++ Source/WTF/wtf/Platform.h
@@ -707,7 +707,7 @@
#endif /* OS(DARWIN) */
-#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
+#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__linux__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
#define HAVE_MACHINE_CONTEXT 1
#endif
--- Source/WebCore/xml/XPathGrammar.cpp.orig 2018-04-18 08:26:41.000000000 +0200
+++ Source/WebCore/xml/XPathGrammar.cpp 2018-09-17 15:46:36.742115881 +0200
--- Source/WebCore/xml/XPathGrammar.cpp
+++ Source/WebCore/xml/XPathGrammar.cpp
@@ -966,7 +966,7 @@
#if YYERROR_VERBOSE

View file

@ -1,23 +0,0 @@
Fix code emitted for armv6l to not use movw/movt but ldr.
See https://bugs.webkit.org/show_bug.cgi?id=131612
and https://bugs.webkit.org/show_bug.cgi?id=141288
--- Source/JavaScriptCore/offlineasm/arm.rb 2015-07-22 14:37:57.000000000 +0200
+++ Source/JavaScriptCore/offlineasm/arm.rb 2015-08-08 00:31:21.011824644 +0200
@@ -473,8 +473,16 @@
$asm.puts "mov #{armFlippedOperands(operands)}"
end
when "mvlbl"
+ if isARMv7 or isARMv7Traditional
$asm.puts "movw #{operands[1].armOperand}, \#:lower16:#{operands[0].value}"
$asm.puts "movt #{operands[1].armOperand}, \#:upper16:#{operands[0].value}"
+ else
+ $mvlbl_counter ||= 0
+ $mvlbl_counter += 1
+ const_label = "_mvlbl_const_label#{$mvlbl_counter}"
+ $asm.puts ".equ #{const_label}, (#{operands[0].value})"
+ $asm.puts "ldr #{operands[1].armOperand}, =#{const_label}"
+ end
when "nop"
$asm.puts "nop"
when "bieq", "bpeq", "bbeq"

View file

@ -0,0 +1,41 @@
This fixes JavaScriptCore on big endian systems (mainly ppc).
Without the patch, attempting to run any JS results in
a crash as the generated code was endian specific.
--- Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
+++ Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
@@ -1435,13 +1435,13 @@ llintOpWithMetadata(op_put_by_id, OpPutById, macro (size, get, dispatch, metadat
loadp StructureChain::m_vector[t3], t3
assert(macro (ok) btpnz t3, ok end)
- loadp Structure::m_prototype[t2], t2
+ loadp Structure::m_prototype + PayloadOffset[t2], t2
btpz t2, .opPutByIdTransitionChainDone
.opPutByIdTransitionChainLoop:
loadp [t3], t1
bineq t1, JSCell::m_structureID[t2], .opPutByIdSlow
addp 4, t3
- loadp Structure::m_prototype[t1], t2
+ loadp Structure::m_prototype + PayloadOffset[t1], t2
btpnz t2, .opPutByIdTransitionChainLoop
.opPutByIdTransitionChainDone:
@@ -1952,7 +1952,7 @@ end)
op(llint_throw_from_slow_path_trampoline, macro()
- loadp Callee[cfr], t1
+ loadp Callee + PayloadOffset[cfr], t1
andp MarkedBlockMask, t1
loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t1], t1
copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2)
@@ -1962,7 +1962,7 @@ op(llint_throw_from_slow_path_trampoline, macro()
# When throwing from the interpreter (i.e. throwing from LLIntSlowPaths), so
# the throw target is not necessarily interpreted code, we come to here.
# This essentially emulates the JIT's throwing protocol.
- loadp Callee[cfr], t1
+ loadp Callee + PayloadOffset[cfr], t1
andp MarkedBlockMask, t1
loadp MarkedBlockFooterOffset + MarkedBlock::Footer::m_vm[t1], t1
jmp VM::targetMachinePCForThrow[t1]

View file

@ -1,16 +1,26 @@
# Template file for 'webkit2gtk'
pkgname=webkit2gtk
version=2.24.3
revision=2
version=2.25.4
revision=1
wrksrc="webkitgtk-${version}"
build_style=cmake
build_helper="gir"
configure_args="-DPORT=GTK -DENABLE_GTKDOC=OFF -DCMAKE_LINKER=${XBPS_CROSS_TRIPLET}-gcc
-DUSE_GSTREAMER_GL=OFF -DRUBY_VERSION=2.6 -DENABLE_C_LOOP=$(vopt_if jit OFF ON)
configure_args="-DPORT=GTK -DUSE_LD_GOLD=OFF
-DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_CXX_FLAGS_DEBUG=-DNDEBUG
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_C_FLAGS_DEBUG=-DNDEBUG
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-DCMAKE_LINKER=${XBPS_CROSS_TRIPLET}-gcc
-DRUBY_VERSION=2.6
-DRUBY_CONFIG_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include/ruby-2.6.0
-DENABLE_GTKDOC=OFF -DUSE_GSTREAMER_GL=OFF -DUSE_WPE_RENDERER=OFF
-DENABLE_JIT=$(vopt_if jit ON OFF)
-DENABLE_C_LOOP=$(vopt_if jit OFF ON)
-DENABLE_INTROSPECTION=$(vopt_if gir ON OFF)
-DENABLE_WAYLAND_TARGET=$(vopt_if wayland ON OFF)
-DENABLE_X11_TARGET=$(vopt_if x11 ON OFF) -DENABLE_JIT=$(vopt_if jit ON OFF)
-DENABLE_X11_TARGET=$(vopt_if x11 ON OFF)
-DENABLE_SAMPLING_PROFILER=$(vopt_if sampling_profiler ON OFF)"
hostmakedepends="perl python pkg-config gperf flex ruby glib-devel geoclue2
$(vopt_if wayland wayland-devel)"
@ -19,47 +29,74 @@ makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel
libsoup-devel libxslt-devel gnutls-devel icu-devel enchant-devel
dbus-glib-devel libwebp-devel gtk+-devel gtk+3-devel libgudev-devel
libsecret-devel ruby-devel geoclue2-devel libnotify-devel hyphen-devel
woff2-devel freetype-devel libopenjpeg2-devel
$(vopt_if x11 libXt-devel) $(vopt_if jit '' libatomic-devel)
woff2-devel freetype-devel libopenjpeg2-devel libatomic-devel
qt5-devel $(vopt_if x11 libXt-devel)
$(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')"
short_desc="GTK+3 port of the WebKit2 browser engine"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later, BSD-2-Clause"
homepage="https://webkitgtk.org/"
distfiles="${homepage}/releases/webkitgtk-${version}.tar.xz"
checksum=940d746d7e82c357222feb5b3f44c4b201e81df7d81ddca5ca2bf3ae0acf6c51
checksum=9361058c059402117995c779906f4a25232185ce7735663428fda9cf3c79f101
makedepends+=" qt5-devel"
build_options="gir wayland x11 bubblewrap jit sampling_profiler"
build_options_default="gir wayland x11 bubblewrap"
# ETOOHUGE
nodebug=1
desc_option_bubblewrap="Enable bubblewrap sandbox"
desc_option_jit="JavaScript JIT (Only some architectures)"
desc_option_sampling_profiler="Sampling profiler support (JIT + glibc only)"
CXXFLAGS="-Wno-expansion-to-defined -Wno-redundant-move -Wno-deprecated-copy"
# Package build options
build_options="gir wayland x11 jit sampling_profiler"
build_options_default="gir wayland x11"
desc_option_jit="Enable JustInTime JS support"
desc_option_sampling_profiler="Toggle sampling profiler support (disabled on musl)"
# detection + runtime
if [ "$build_option_bubblewrap" ]; then
hostmakedepends+=" bubblewrap xdg-dbus-proxy"
makedepends+=" libseccomp-devel"
depends+=" bubblewrap xdg-dbus-proxy"
fi
# only a few platform support JIT
case "$XBPS_TARGET_MACHINE" in
aarch64*|arm*|ppc|ppc-musl) configure_args+=" -DUSE_LD_GOLD=0";;
armv7l*|aarch64*|x86_64*|mips*)
build_options_default+=" jit"
if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
build_options_default+=" sampling_profiler"
elif [ "$build_option_sampling_profiler" ]; then
broken="sampling_profiler is only supported on glibc"
fi
;;
i686*)
# JIT requires SSE2 so disabled by default
# it's also currently broken
if [ "$build_option_jit" ]; then
broken="OffsetExtractor: No magic values found."
fi
;;
*)
if [ "$build_option_jit" ]; then
broken="JIT is not supported on ${XBPS_TARGET_MACHINE}"
fi
;;
esac
# JIT conflicts with sampling_profiler
case "$XBPS_TARGET_MACHINE" in
i686*|ppc*|mips*|arm*) ;;
*-musl) build_options_default+=" jit" ;;
*) build_options_default+=" jit sampling_profiler" ;;
esac
# extra validation
if [ "$build_option_sampling_profiler" -a -z "$build_option_jit" ]; then
broken="sampling_profiler requires JIT"
fi
pre_configure() {
# work around large debug symbols on 32-bit hosts
if [ "$XBPS_WORDSIZE" = "32" ]; then
export CFLAGS="${CFLAGS/-g/-g1}"
export CXXFLAGS="${CXXFLAGS/-g/-g1}"
export LDFLAGS+=" -Wl,--no-keep-memory"
fi
# the above is not enough for 32-bit ppc and debug
case "$XBPS_TARGET_MACHINE" in
armv[56]*|ppc|ppc-musl) # Add -latomic to the targets
find -name "CMakeLists.txt" -exec sed -i "{}" \
-e "/target_link_libraries/s/)/ atomic)/" \;
;;
ppc64*) ;;
ppc*)
export CFLAGS="${CFLAGS/-O2/-Os}"
export CXXFLAGS="${CXXFLAGS/-O2/-Os}"
;;
esac
}