Changeset 290975 in webkit for trunk/Source/JavaScriptCore/offlineasm/asm.rb
- Timestamp:
- Mar 7, 2022, 11:18:39 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/offlineasm/asm.rb
r284868 r290975 34 34 require "self_hash" 35 35 require "settings" 36 require "shellwords" 36 37 require "transform" 37 38 … … 348 349 $options = {} 349 350 OptionParser.new do |opts| 350 opts.banner = "Usage: asm.rb asmFile offsetsFile outputFileName [--assembler=<ASM>] [--webkit-additions-path=<path>] [--binary-format=<format>] "351 opts.banner = "Usage: asm.rb asmFile offsetsFile outputFileName [--assembler=<ASM>] [--webkit-additions-path=<path>] [--binary-format=<format>] [--depfile=<depfile>]" 351 352 # This option is currently only used to specify the masm assembler 352 353 opts.on("--assembler=[ASM]", "Specify an assembler to use.") do |assembler| … … 358 359 opts.on("--binary-format=FORMAT", "Specify the binary format used by the target system.") do |format| 359 360 $options[:binary_format] = format 361 end 362 opts.on("--depfile=DEPFILE", "Path to write Makefile-style discovered dependencies to.") do |path| 363 $options[:depfile] = path 360 364 end 361 365 end.parse! … … 385 389 " " + Digest::SHA1.hexdigest($options.has_key?(:assembler) ? $options[:assembler] : "") 386 390 387 if FileTest.exist? outputFlnm391 if FileTest.exist?(outputFlnm) and (not $options[:depfile] or FileTest.exist?($options[:depfile])) 388 392 lastLine = nil 389 393 File.open(outputFlnm, "r") { … … 408 412 409 413 $asm = Assembler.new($output) 410 411 ast = parse(asmFile, $options) 414 415 sources = Set.new 416 ast = parse(asmFile, $options, sources) 412 417 settingsCombinations = computeSettingsCombinations(ast) 418 419 if $options[:depfile] 420 depfile = File.open($options[:depfile], "w") 421 depfile.print(Shellwords.escape(outputFlnm), ": ") 422 depfile.puts(Shellwords.join(sources.sort)) 423 end 413 424 414 425 configurationList.each {
Note:
See TracChangeset
for help on using the changeset viewer.