Bug 1529139 - Add proper dependencies for win{32,64}.asm. r=froydnj, a=jcristau
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 21 Feb 2019 00:11:04 +0000
changeset 516093 53e4e8116497537edfee2007838079d437cd1b0f
parent 516092 009f023e478cf643f46136951c78887e578ce02d
child 516094 d1f8173046a0e34410ae3b9574746a8d26c6102a
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, jcristau
bugs1529139
milestone66.0
Bug 1529139 - Add proper dependencies for win{32,64}.asm. r=froydnj, a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D20587
config/external/ffi/moz.build
config/external/ffi/preprocess_libffi_asm.py
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -88,30 +88,38 @@ else:
         # MinGW Build for 32 bit
         if CONFIG['CC_TYPE'] in ('gcc', 'clang'):
             DEFINES['SYMBOL_UNDERSCORE'] = True
             ffi_srcs += ['win32.S']
         else:
             # libffi asm needs to be preprocessed for MSVC
             GENERATED_FILES += ['win32.asm']
             asm = GENERATED_FILES['win32.asm']
-            asm.inputs = ['/js/src/ctypes/libffi/src/x86/win32.S']
+            asm.inputs = [
+                '/js/src/ctypes/libffi/src/x86/win32.S',
+                '!../../../js/src/ctypes/libffi/fficonfig.h',
+                '!../../../js/src/ctypes/libffi/include/ffi.h',
+            ]
             asm.script = 'preprocess_libffi_asm.py'
             asm.flags = ['$(DEFINES)', '$(LOCAL_INCLUDES)']
             SOURCES += ['!win32.asm']
             ASFLAGS += ['-safeseh']
     elif CONFIG['FFI_TARGET'] == 'X86_WIN64':
         ffi_srcs = ['ffi.c']
         if CONFIG['CC_TYPE'] in ('gcc', 'clang'):
             ffi_srcs += ['win64.S']
         else:
             # libffi asm needs to be preprocessed for MSVC
             GENERATED_FILES += ['win64.asm']
             asm = GENERATED_FILES['win64.asm']
-            asm.inputs = ['/js/src/ctypes/libffi/src/x86/win64.S']
+            asm.inputs = [
+                '/js/src/ctypes/libffi/src/x86/win64.S',
+                '!../../../js/src/ctypes/libffi/fficonfig.h',
+                '!../../../js/src/ctypes/libffi/include/ffi.h',
+            ]
             asm.script = 'preprocess_libffi_asm.py'
             asm.flags = ['$(DEFINES)', '$(LOCAL_INCLUDES)']
             SOURCES += ['!win64.asm']
     elif CONFIG['FFI_TARGET'] == 'X86_DARWIN':
         DEFINES['FFI_MMAP_EXEC_WRIT'] = True
         if CONFIG['CPU_ARCH'] == 'x86':
             ffi_srcs = ('ffi.c', 'darwin.S', 'ffi64.c', 'darwin64.S',
                         'win32.S')
--- a/config/external/ffi/preprocess_libffi_asm.py
+++ b/config/external/ffi/preprocess_libffi_asm.py
@@ -7,17 +7,17 @@
 import buildconfig
 import mozpack.path as mozpath
 import os
 import re
 import shlex
 import subprocess
 
 
-def main(output, input_asm, defines, includes):
+def main(output, input_asm, ffi_h, ffi_config_h, defines, includes):
     defines = shlex.split(defines)
     includes = shlex.split(includes)
     # CPP uses -E which generates #line directives. -EP suppresses them.
     cpp = buildconfig.substs['CPP'] + ['-EP']
     input_asm = mozpath.relpath(input_asm, os.getcwd())
     args = cpp + defines + includes + [input_asm]
     print(' '.join(args))
     preprocessed = subprocess.check_output(args)