зеркало из https://github.com/mozilla/gecko-dev.git
adb2ee48ac
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 |
||
---|---|---|
.. | ||
Moz | ||
external | ||
faster | ||
makefiles | ||
mozunit | ||
tests | ||
AB_rCD.mk | ||
Makefile.in | ||
MozZipFile.py | ||
autoconf-js.mk.in | ||
autoconf.mk.in | ||
baseconfig.mk | ||
check_js_msg_encoding.py | ||
check_js_opcode.py | ||
check_macroassembler_style.py | ||
check_source_count.py | ||
check_spidermonkey_style.py | ||
check_vanilla_allocations.py | ||
config.mk | ||
createprecomplete.py | ||
emptyvars-js.mk.in | ||
emptyvars.mk.in | ||
gcc-stl-wrapper.template.h | ||
gcc_hidden.h | ||
install.bat | ||
make-stl-wrappers.py | ||
make-system-wrappers.py | ||
make-windows-h-wrapper.py | ||
milestone.txt | ||
moz.build | ||
msvc-stl-wrapper.template.h | ||
nsinstall.c | ||
nsinstall.py | ||
pathsub.c | ||
pathsub.h | ||
printconfigsetting.py | ||
printprereleasesuffix.py | ||
pythonpath.py | ||
rebuild_check.py | ||
recurse.mk | ||
rules.mk | ||
run-and-prefix.py | ||
run_spidermonkey_checks.py | ||
static-checking-config.mk | ||
stl-headers.mozbuild | ||
system-headers.mozbuild | ||
system_header_util.py | ||
version.mk | ||
version_win.pl | ||
windows-h-constant.decls.h | ||
windows-h-unicode.decls.h | ||
windows-h-wrapper.template.h |