Commit 29b0c186 authored by Johann's avatar Johann Committed by Johann Koenig

nasm defaults to -Ox

No need to specify default behaviour. The original change introducing nasm:
https://chromium.googlesource.com/webm/libvpx/+/7be093ea4d50c8d38438f88cb9fa817c1c9de8dd
mentions requiring 2.0.9, which was the first release to default to this behaviour:
http://www.nasm.us/doc/nasmdoc2.html
"The -Ox mode is recommended for most uses, and is the default since NASM 2.09."

Cherry picked from libvpx 65df957 and cmake updated.

Change-Id: Ie860b37d070b0fbd7f61d20f527396ee796e826f
parent 02869c20
......@@ -137,7 +137,6 @@ if ("${AOM_TARGET_CPU}" STREQUAL "x86" OR "${AOM_TARGET_CPU}" STREQUAL "x86_64")
if (ENABLE_NASM)
find_program(AS_EXECUTABLE nasm $ENV{NASM_PATH})
test_nasm()
set(AOM_AS_FLAGS ${AOM_AS_FLAGS} -Ox)
else ()
find_program(AS_EXECUTABLE yasm $ENV{YASM_PATH})
endif ()
......
......@@ -200,17 +200,11 @@ function (add_gas_asm_library lib_name asm_sources dependent_target)
endfunction ()
# Terminates generation if nasm found in PATH does not meet requirements.
# Currently checks only for presence of required object formats and support for
# the -Ox argument (multipass optimization).
# Currently checks only for presence of required object formats.
function (test_nasm)
execute_process(COMMAND ${AS_EXECUTABLE} -hf
OUTPUT_VARIABLE nasm_helptext)
if (NOT "${nasm_helptext}" MATCHES "-Ox")
message(FATAL_ERROR
"Unsupported nasm: multipass optimization not supported.")
endif ()
if ("${AOM_TARGET_CPU}" STREQUAL "x86")
if ("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin")
if (NOT "${nasm_helptext}" MATCHES "macho32")
......
......@@ -1267,7 +1267,6 @@ EOF
esac
log_echo " using $AS"
fi
[ "${AS##*/}" = nasm ] && add_asflags -Ox
AS_SFX=.asm
case ${tgt_os} in
win32)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment