summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bernstein <ruby@bernsteinbear.com>2026-04-08 10:47:34 -0400
committerMax Bernstein <tekknolagi@gmail.com>2026-04-08 18:18:12 -0400
commit64a49051a46d986b4d3b1f279eaef3d141e20d5a (patch)
tree6b311d495b2abc7c5b5e3350094eb782d4ac4b4a
parentb24320958b111327c232fde20448a5f6b30b8c02 (diff)
ZJIT: Detect bad configuration in make command in bisect script
-rwxr-xr-xtool/zjit_bisect.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/zjit_bisect.rb b/tool/zjit_bisect.rb
index 38235561ec..798b98b1f7 100755
--- a/tool/zjit_bisect.rb
+++ b/tool/zjit_bisect.rb
@@ -82,6 +82,9 @@ def add_zjit_options cmd
zjit_opts = cmd.select { |arg| arg.start_with?("--zjit") }
run_opts_index = cmd.find_index { |arg| arg.start_with?("RUN_OPTS=") }
specopts_index = cmd.find_index { |arg| arg.start_with?("SPECOPTS=") }
+ if run_opts_index && specopts_index
+ raise "Expected only one of RUN_OPTS or SPECOPTS to be present in make command, but both were found"
+ end
if run_opts_index
run_opts = Shellwords.split(cmd[run_opts_index].delete_prefix("RUN_OPTS="))
run_opts.concat(zjit_opts)