Ignore:
Timestamp:
Oct 3, 2016, 4:24:56 PM (9 years ago)
Author:
[email protected]
Message:

Offline asm should not output masm assembly when using a x86_64 asm backend
https://bugs.webkit.org/show_bug.cgi?id=162705

When cross compiling on windows to Clang, masm was being generated simply because
the os was windows. This change adds a command line parameter --assembler=MASM
to set the output assembly to masm.
The functions isGCC and isCompilingToWindows were removed as they are no longer called.

Patch by Christopher Reid <[email protected]> on 2016-10-03
Reviewed by Mark Lam.

  • CMakeLists.txt:
  • offlineasm/asm.rb:
  • offlineasm/x86.rb:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/asm.rb

    r200666 r206759  
    3030require "digest/sha1"
    3131require "offsets"
     32require 'optparse'
    3233require "parser"
    3334require "self_hash"
     
    302303outputFlnm = ARGV.shift
    303304
     305$options = {}
     306OptionParser.new do |opts|
     307    opts.banner = "Usage: asm.rb asmFile offsetsFile outputFileName [--assembler=<ASM>]"
     308    # This option is currently only used to specify the masm assembler
     309    opts.on("--assembler=[ASM]", "Specify an assembler to use.") do |assembler|
     310        $options[:assembler] = assembler
     311    end
     312end.parse!
     313
    304314begin
    305315    configurationList = offsetsAndConfigurationIndex(offsetsFile)
     
    320330    $commentPrefix + " offlineasm input hash: " + parseHash(asmFile) +
    321331    " " + Digest::SHA1.hexdigest(configurationList.map{|v| (v[0] + [v[1]]).join(' ')}.join(' ')) +
    322     " " + selfHash
     332    " " + selfHash +
     333    " " + Digest::SHA1.hexdigest($options.has_key?(:assembler) ? $options[:assembler] : "")
    323334
    324335if FileTest.exist? outputFlnm
Note: See TracChangeset for help on using the changeset viewer.