gecko-dev/config
Nathan Froyd adb2ee48ac Bug 1561069 - fix mistranslation in preprocess_libffi_asm.py; r=glandium
When we converted our libffi assembly preprocessing to use
`GENERATED_FILES`, we translated `sed 's%/F[dpa][^ ]*%%g'` to use the Python
regular expression `'F[dpa][^ ]*'`.  Note that we missed the leading `/` in
the sed expression; omitting that leading slash causes no end of trouble if
you have particular expressions in your assembly file, such as
"FastFailCode".  (I'm a little surprised this hasn't bitten us yet.)

The straightfoward fix is to add the leading slash.

But wait, the rabbit hole goes deeper.  The actual bit from libffi's
`msvcc.sh` that this was trying to translate was:

```
    echo "$cl -nologo -EP $includes $defines $src > $ppsrc"
    "$cl" -nologo -EP $includes $defines $src > $ppsrc || exit $?
    output="$(echo $output | sed 's%/F[dpa][^ ]*%%g')"
    args="-nologo $safeseh $single $output $ppsrc"

    echo "$ml $args"
    eval "\"$ml\" $args"
    result=$?
```

Note that the sed expression is operating on `$output`, which is a
completely *separate* thing from the output from the result of
preprocessing.  In `msvcc.sh`, `$output` is actually some arguments that are
supposed to be passed to the assembler, per the above and the only place in
the script that sets `$output` to a non-trivial value:

```
    -o)
      outdir="$(dirname $2)"
      base="$(basename $2|sed 's/\.[^.]*//g')"
      if [ -n "$single" ]; then
        output="-Fo$2"
      else
        output="-Fe$2"
      fi
      if [ -n "$assembly" ]; then
        args="$args $output"
      else
        args="$args $output -Fd$outdir/$base -Fp$outdir/$base -Fa$outdir/$base"
      fi
```

Presumably the sed expression is attempting to remove `-Fd` and friends from
`$args` instead of `$output`, but failing badly at doing so.

In any event, the regex substitution the script is doing is unnecessary and,
with the current code, actively harmful.  Let's remove the regular
expression substitution entirely.

Differential Revision: https://phabricator.services.mozilla.com/D35705

--HG--
extra : moz-landing-system : lando
2019-06-24 21:26:32 +00:00
..
external Bug 1561069 - fix mistranslation in preprocess_libffi_asm.py; r=glandium 2019-06-24 21:26:32 +00:00
faster Bug 1558737 - Remove BUILD_FASTER define. r=nalexander 2019-06-12 16:20:16 +00:00
makefiles Bug 1560620 - Export PKG_CONFIG so that the pkg-config rust crate picks the same pkg-config as configure. r=froydnj 2019-06-21 23:54:12 +00:00
Moz
mozunit
tests
AB_rCD.mk
autoconf-js.mk.in
autoconf.mk.in
baseconfig.mk Bug 1560442 - Allow to build rust code in a separate tier. r=froydnj 2019-06-21 13:20:17 +00:00
check_js_msg_encoding.py
check_js_opcode.py
check_macroassembler_style.py Bug 1522431 - Implement IC support for BigInt r=jandem,terpri 2019-01-28 00:21:41 +00:00
check_source_count.py
check_spidermonkey_style.py Bug 1551639 - Use .inc suffix for generated source files that are only included. r=nalexander 2019-06-06 04:34:53 +00:00
check_vanilla_allocations.py Bug 1533481 - Part 4: Prepare update to ICU 64. r=jwalden! 2019-04-04 11:52:54 +03:00
config.mk Bug 1560527 - Enable make backend verbose mode automatically rather than relying on mach setting it. r=froydnj 2019-06-21 13:15:30 +00:00
createprecomplete.py Bug 1547730 - Fix precomplete file generation when passing in unicode strings. r=glandium 2019-05-28 14:28:57 +00:00
emptyvars-js.mk.in
emptyvars.mk.in
gcc_hidden.h
gcc-stl-wrapper.template.h
install.bat
make-stl-wrappers.py
make-system-wrappers.py
make-windows-h-wrapper.py
Makefile.in
milestone.txt Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2019-05-20 13:22:45 +00:00
moz.build Bug 1512504 - Remove support for MSVC. r=froydnj 2019-02-14 21:45:27 +00:00
MozZipFile.py
msvc-stl-wrapper.template.h
nsinstall.c Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsinstall.py
pathsub.c Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
pathsub.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
printconfigsetting.py
printprereleasesuffix.py
pythonpath.py
rebuild_check.py
recurse.mk
rules.mk Bug 1560527 - Enable make backend verbose mode automatically rather than relying on mach setting it. r=froydnj 2019-06-21 13:15:30 +00:00
run_spidermonkey_checks.py
run-and-prefix.py
static-checking-config.mk
stl-headers.mozbuild Bug 1349064 - Add <regex> to config/std-headers. r=froydnj 2019-02-21 11:23:58 -08:00
system_header_util.py
system-headers.mozbuild Bug 1557171 - Wrap the sys/cachectl.h system header on mips linux. r=froydnj 2019-06-07 00:02:18 +00:00
version_win.pl
version.mk
windows-h-constant.decls.h Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug 2019-06-17 04:36:29 +00:00
windows-h-unicode.decls.h
windows-h-wrapper.template.h