<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[282980] branches/safari-612-branch/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/282980">282980</a></dd>
<dt>Author</dt> <dd>repstein@apple.com</dd>
<dt>Date</dt> <dd>2021-09-23 12:15:03 -0700 (Thu, 23 Sep 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/282009">r282009</a>. rdar://problem/83430109

    [JSC] Fix WebKitAdditions directory traversal in offlineasm part 2
    https://bugs.webkit.org/show_bug.cgi?id=229853

    Reviewed by Mark Lam.

    When DEPLOYMENT_LOCATION is YES, WEBKITADDITIONS_HEADERS_FOLDER_PATH is /usr/local/include/WebKitAdditions.
    However, since Xcode implicitly changes it to ${SDKROOT}/usr/local/include/WebKitAdditions, we need to
    pass the path with ${SDKROOT} if this path is used by non-Xcode.

    In this patch, we replace --use-deployment-location with --webkit-additions-path=path and passing WebKitAdditions
    path directly from Xcode. We define WK_WEBKITADDITIONS_INSTALL_PATH and WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH in
    JavaScriptCore/Configurations/Base.xcconfig to populate this variable and pass WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH
    to the scripts.

    We also fix offlineasm's path concatenation. It was using +, but this does not work if directory doesn't end with '/'.
    We should use File.join when concatenating file paths.

    * Configurations/Base.xcconfig:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * offlineasm/asm.rb:
    * offlineasm/generate_offset_extractor.rb:
    * offlineasm/generate_settings_extractor.rb:
    * offlineasm/parser.rb:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282009 268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari612branchSourceJavaScriptCoreChangeLog">branches/safari-612-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreConfigurationsBasexcconfig">branches/safari-612-branch/Source/JavaScriptCore/Configurations/Base.xcconfig</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">branches/safari-612-branch/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreofflineasmasmrb">branches/safari-612-branch/Source/JavaScriptCore/offlineasm/asm.rb</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreofflineasmgenerate_offset_extractorrb">branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreofflineasmgenerate_settings_extractorrb">branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_settings_extractor.rb</a></li>
<li><a href="#branchessafari612branchSourceJavaScriptCoreofflineasmparserrb">branches/safari-612-branch/Source/JavaScriptCore/offlineasm/parser.rb</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari612branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/ChangeLog (282979 => 282980)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/ChangeLog       2021-09-23 19:14:59 UTC (rev 282979)
+++ branches/safari-612-branch/Source/JavaScriptCore/ChangeLog  2021-09-23 19:15:03 UTC (rev 282980)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2021-09-23  Alan Coon  <alancoon@apple.com>
+
+        Cherry-pick r282009. rdar://problem/83430109
+
+    [JSC] Fix WebKitAdditions directory traversal in offlineasm part 2
+    https://bugs.webkit.org/show_bug.cgi?id=229853
+    
+    Reviewed by Mark Lam.
+    
+    When DEPLOYMENT_LOCATION is YES, WEBKITADDITIONS_HEADERS_FOLDER_PATH is /usr/local/include/WebKitAdditions.
+    However, since Xcode implicitly changes it to ${SDKROOT}/usr/local/include/WebKitAdditions, we need to
+    pass the path with ${SDKROOT} if this path is used by non-Xcode.
+    
+    In this patch, we replace --use-deployment-location with --webkit-additions-path=path and passing WebKitAdditions
+    path directly from Xcode. We define WK_WEBKITADDITIONS_INSTALL_PATH and WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH in
+    JavaScriptCore/Configurations/Base.xcconfig to populate this variable and pass WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH
+    to the scripts.
+    
+    We also fix offlineasm's path concatenation. It was using +, but this does not work if directory doesn't end with '/'.
+    We should use File.join when concatenating file paths.
+    
+    * Configurations/Base.xcconfig:
+    * JavaScriptCore.xcodeproj/project.pbxproj:
+    * offlineasm/asm.rb:
+    * offlineasm/generate_offset_extractor.rb:
+    * offlineasm/generate_settings_extractor.rb:
+    * offlineasm/parser.rb:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-03  Yusuke Suzuki  <ysuzuki@apple.com>
+
+            [JSC] Fix WebKitAdditions directory traversal in offlineasm part 2
+            https://bugs.webkit.org/show_bug.cgi?id=229853
+
+            Reviewed by Mark Lam.
+
+            When DEPLOYMENT_LOCATION is YES, WEBKITADDITIONS_HEADERS_FOLDER_PATH is /usr/local/include/WebKitAdditions.
+            However, since Xcode implicitly changes it to ${SDKROOT}/usr/local/include/WebKitAdditions, we need to
+            pass the path with ${SDKROOT} if this path is used by non-Xcode.
+
+            In this patch, we replace --use-deployment-location with --webkit-additions-path=path and passing WebKitAdditions
+            path directly from Xcode. We define WK_WEBKITADDITIONS_INSTALL_PATH and WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH in
+            JavaScriptCore/Configurations/Base.xcconfig to populate this variable and pass WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH
+            to the scripts.
+
+            We also fix offlineasm's path concatenation. It was using +, but this does not work if directory doesn't end with '/'.
+            We should use File.join when concatenating file paths.
+
+            * Configurations/Base.xcconfig:
+            * JavaScriptCore.xcodeproj/project.pbxproj:
+            * offlineasm/asm.rb:
+            * offlineasm/generate_offset_extractor.rb:
+            * offlineasm/generate_settings_extractor.rb:
+            * offlineasm/parser.rb:
+
</ins><span class="cx"> 2021-09-22  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Cherry-pick r281972. rdar://problem/83429723
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreConfigurationsBasexcconfig"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/Configurations/Base.xcconfig (282979 => 282980)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/Configurations/Base.xcconfig    2021-09-23 19:14:59 UTC (rev 282979)
+++ branches/safari-612-branch/Source/JavaScriptCore/Configurations/Base.xcconfig       2021-09-23 19:15:03 UTC (rev 282980)
</span><span class="lines">@@ -180,6 +180,9 @@
</span><span class="cx"> WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
</span><span class="cx"> WK_IS_COCOA_TOUCH = $(WK_NOT_$(WK_EMPTY_$(WK_COCOA_TOUCH)));
</span><span class="cx"> 
</span><ins>+WK_WEBKITADDITIONS_INSTALL_PATH = /usr/local/include/WebKitAdditions
+WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH = $(SDKROOT)/$(WK_WEBKITADDITIONS_INSTALL_PATH)
+
</ins><span class="cx"> // Disable LTO for JavaScriptCore, due to <rdar://problem/24543547>. Add back the following line and delete the one that says "LLVM_LTO = NO" when that issue is resolved.
</span><span class="cx"> // LLVM_LTO = $(WK_LLVM_LTO_$(WK_XCODE_SUPPORTS_LTO));
</span><span class="cx"> LLVM_LTO = NO;
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (282979 => 282980)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2021-09-23 19:14:59 UTC (rev 282979)
+++ branches/safari-612-branch/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj   2021-09-23 19:15:03 UTC (rev 282980)
</span><span class="lines">@@ -11180,7 +11180,7 @@
</span><span class="cx">                  );
</span><span class="cx">                  runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                  shellPath = /bin/sh;
</span><del>-                       shellScript = "set -e\n\nOFFLINEASM_ARGS=\"\"\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n    OFFLINEASM_ARGS=\"${OFFLINEASM_ARGS} --use-deployment-location\"\nfi\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\"  \"${BUILT_PRODUCTS_DIR}/JSCLLIntSettingsExtractor\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredOffsets.h\" \"${ARCHS} C_LOOP\" \"${BUILD_VARIANTS}\" ${OFFLINEASM_ARGS}\n";
</del><ins>+                        shellScript = "set -e\n\nOFFLINEASM_ARGS=\"\"\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n    OFFLINEASM_ARGS=\"${OFFLINEASM_ARGS} --webkit-additions-path=${WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH}\"\nfi\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_offset_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\"  \"${BUILT_PRODUCTS_DIR}/JSCLLIntSettingsExtractor\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredOffsets.h\" \"${ARCHS} C_LOOP\" \"${BUILD_VARIANTS}\" ${OFFLINEASM_ARGS}\n";
</ins><span class="cx">           };
</span><span class="cx">          14BD6892215191450050DAFF /* Generate Derived Sources */ = {
</span><span class="cx">                  isa = PBXShellScriptBuildPhase;
</span><span class="lines">@@ -11194,7 +11194,7 @@
</span><span class="cx">                  );
</span><span class="cx">                  runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                  shellPath = /bin/sh;
</span><del>-                       shellScript = "set -e\n\nOFFLINEASM_ARGS=\"\"\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n    OFFLINEASM_ARGS=\"${OFFLINEASM_ARGS} --use-deployment-location\"\nfi\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_settings_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredSettings.h\" \"${ARCHS} C_LOOP\" ${OFFLINEASM_ARGS}\n";
</del><ins>+                        shellScript = "set -e\n\nOFFLINEASM_ARGS=\"\"\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n    OFFLINEASM_ARGS=\"${OFFLINEASM_ARGS} --webkit-additions-path=${WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH}\"\nfi\n\nmkdir -p \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}\"\n\n/usr/bin/env ruby \"${SRCROOT}/offlineasm/generate_settings_extractor.rb\" \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"${SRCROOT}/llint/LowLevelInterpreter.asm\" \"${BUILT_PRODUCTS_DIR}/LLIntOffsets/${ARCHS}/LLIntDesiredSettings.h\" \"${ARCHS} C_LOOP\" ${OFFLINEASM_ARGS}\n";
</ins><span class="cx">           };
</span><span class="cx">          1A02D9A81B34A882000D1522 /* Add Symlink in /System/Library/PrivateFrameworks */ = {
</span><span class="cx">                  isa = PBXShellScriptBuildPhase;
</span><span class="lines">@@ -11440,7 +11440,7 @@
</span><span class="cx">                  );
</span><span class="cx">                  runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                  shellPath = /bin/sh;
</span><del>-                       shellScript = "if [[ \"${ACTION}\" == \"installhdrs\" ]]; then\n    exit 0\nfi\n\nOFFLINEASM_ARGS=\"\"\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n    OFFLINEASM_ARGS=\"${OFFLINEASM_ARGS} --use-deployment-location\"\nfi\n\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\n\n/usr/bin/env ruby JavaScriptCore/offlineasm/asm.rb \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" JavaScriptCore/llint/LowLevelInterpreter.asm \"${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor\" LLIntAssembly.h \"${BUILD_VARIANTS}\" ${OFFLINEASM_ARGS} || exit 1\n";
</del><ins>+                        shellScript = "if [[ \"${ACTION}\" == \"installhdrs\" ]]; then\n    exit 0\nfi\n\nOFFLINEASM_ARGS=\"\"\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n    OFFLINEASM_ARGS=\"${OFFLINEASM_ARGS} --webkit-additions-path=${WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH}\"\nfi\n\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\"\n\n/usr/bin/env ruby JavaScriptCore/offlineasm/asm.rb \"-I${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" JavaScriptCore/llint/LowLevelInterpreter.asm \"${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor\" LLIntAssembly.h \"${BUILD_VARIANTS}\" ${OFFLINEASM_ARGS} || exit 1\n";
</ins><span class="cx">           };
</span><span class="cx">          65FB3F6509D11E9100F49DEB /* Generate Derived Sources */ = {
</span><span class="cx">                  isa = PBXShellScriptBuildPhase;
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreofflineasmasmrb"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/offlineasm/asm.rb (282979 => 282980)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/offlineasm/asm.rb       2021-09-23 19:14:59 UTC (rev 282979)
+++ branches/safari-612-branch/Source/JavaScriptCore/offlineasm/asm.rb  2021-09-23 19:15:03 UTC (rev 282980)
</span><span class="lines">@@ -335,13 +335,13 @@
</span><span class="cx"> 
</span><span class="cx"> $options = {}
</span><span class="cx"> OptionParser.new do |opts|
</span><del>-    opts.banner = "Usage: asm.rb asmFile offsetsFile outputFileName [--assembler=<ASM>] [--use-deployment-location]"
</del><ins>+    opts.banner = "Usage: asm.rb asmFile offsetsFile outputFileName [--assembler=<ASM>] [--webkit-additions-path=<path>]"
</ins><span class="cx">     # This option is currently only used to specify the masm assembler
</span><span class="cx">     opts.on("--assembler=[ASM]", "Specify an assembler to use.") do |assembler|
</span><span class="cx">         $options[:assembler] = assembler
</span><span class="cx">     end
</span><del>-    opts.on("--use-deployment-location", "Flag to use deployment location.") do |flag|
-        $options[:use_deployment_location] = flag
</del><ins>+    opts.on("--webkit-additions-path=PATH", "WebKitAdditions path.") do |path|
+        $options[:webkit_additions_path] = path
</ins><span class="cx">     end
</span><span class="cx"> end.parse!
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreofflineasmgenerate_offset_extractorrb"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb (282979 => 282980)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb 2021-09-23 19:14:59 UTC (rev 282979)
+++ branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb    2021-09-23 19:15:03 UTC (rev 282980)
</span><span class="lines">@@ -48,9 +48,9 @@
</span><span class="cx"> 
</span><span class="cx"> $options = {}
</span><span class="cx"> OptionParser.new do |opts|
</span><del>-    opts.banner = "Usage: generate_offset_extractor.rb asmFile settingFile outputFileName backends variants [--use-deployment-location]"
-    opts.on("--use-deployment-location", "Flag to use deployment location.") do |flag|
-        $options[:use_deployment_location] = flag
</del><ins>+    opts.banner = "Usage: generate_offset_extractor.rb asmFile settingFile outputFileName backends variants [--webkit-additions-path=<path>]"
+    opts.on("--webkit-additions-path=PATH", "WebKitAdditions path.") do |path|
+        $options[:webkit_additions_path] = path
</ins><span class="cx">     end
</span><span class="cx"> end.parse!
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreofflineasmgenerate_settings_extractorrb"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_settings_extractor.rb (282979 => 282980)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_settings_extractor.rb       2021-09-23 19:14:59 UTC (rev 282979)
+++ branches/safari-612-branch/Source/JavaScriptCore/offlineasm/generate_settings_extractor.rb  2021-09-23 19:15:03 UTC (rev 282980)
</span><span class="lines">@@ -45,9 +45,9 @@
</span><span class="cx"> 
</span><span class="cx"> $options = {}
</span><span class="cx"> OptionParser.new do |opts|
</span><del>-    opts.banner = "Usage: generate_settings_extractor.rb asmFile settingFile [--use-deployment-location]"
-    opts.on("--use-deployment-location", "Flag to use deployment location.") do |flag|
-        $options[:use_deployment_location] = flag
</del><ins>+    opts.banner = "Usage: generate_settings_extractor.rb asmFile settingFile [--webkit-additions-path=<path>]"
+    opts.on("--webkit-additions-path=PATH", "WebKitAdditions path.") do |path|
+        $options[:webkit_additions_path] = path
</ins><span class="cx">     end
</span><span class="cx"> end.parse!
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari612branchSourceJavaScriptCoreofflineasmparserrb"></a>
<div class="modfile"><h4>Modified: branches/safari-612-branch/Source/JavaScriptCore/offlineasm/parser.rb (282979 => 282980)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-612-branch/Source/JavaScriptCore/offlineasm/parser.rb    2021-09-23 19:14:59 UTC (rev 282979)
+++ branches/safari-612-branch/Source/JavaScriptCore/offlineasm/parser.rb       2021-09-23 19:15:03 UTC (rev 282980)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">         directory = nil
</span><span class="cx">         @@includeDirs.each {
</span><span class="cx">             | includePath |
</span><del>-            fileName = includePath + (moduleName + ".asm")
</del><ins>+            fileName = File.join(includePath, moduleName + ".asm")
</ins><span class="cx">             directory = includePath unless not File.file?(fileName)
</span><span class="cx">         }
</span><span class="cx">         if not directory
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">             directory = defaultDir
</span><span class="cx">         end
</span><span class="cx"> 
</span><del>-        @fileName = directory + (moduleName + ".asm")
</del><ins>+        @fileName = File.join(directory, moduleName + ".asm")
</ins><span class="cx">     end
</span><span class="cx"> 
</span><span class="cx">     def self.processIncludeOptions()
</span><span class="lines">@@ -831,8 +831,8 @@
</span><span class="cx">                 parseError unless isIdentifier(@tokens[@idx])
</span><span class="cx">                 moduleName = @tokens[@idx].string
</span><span class="cx">                 @idx += 1
</span><del>-                if @options[:use_deployment_location]
-                    additionsDirectoryName = "/usr/local/include/WebKitAdditions/"
</del><ins>+                if @options[:webkit_additions_path]
+                    additionsDirectoryName = @options[:webkit_additions_path]
</ins><span class="cx">                 else
</span><span class="cx">                     additionsDirectoryName = "#{@buildProductsDirectory}/usr/local/include/WebKitAdditions/"
</span><span class="cx">                 end
</span><span class="lines">@@ -867,8 +867,8 @@
</span><span class="cx">                 parseError unless isIdentifier(@tokens[@idx])
</span><span class="cx">                 moduleName = @tokens[@idx].string
</span><span class="cx">                 @idx += 1
</span><del>-                if @options[:use_deployment_location]
-                    additionsDirectoryName = "/usr/local/include/WebKitAdditions/"
</del><ins>+                if @options[:webkit_additions_path]
+                    additionsDirectoryName = @options[:webkit_additions_path]
</ins><span class="cx">                 else
</span><span class="cx">                     additionsDirectoryName = "#{@buildProductsDirectory}/usr/local/include/WebKitAdditions/"
</span><span class="cx">                 end
</span></span></pre>
</div>
</div>

</body>
</html>