From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/nasm-wrapper | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 src/nasm-wrapper (limited to 'src/nasm-wrapper') diff --git a/src/nasm-wrapper b/src/nasm-wrapper new file mode 100755 index 000000000..84da2cb23 --- /dev/null +++ b/src/nasm-wrapper @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +set -e + +refine_nasm_options="" +while [ -n "$*" ]; do + case "$1" in + -f ) + shift + refine_nasm_options+=" -f $1" + shift + ;; + -c | --param* | -m* | -pipe | -thread ) + # unknown options under nasm & yasm + shift + ;; + -g* ) + # ignore debug format + shift + ;; + -MD ) + # before CMake v3.18, its ninja build rule always passes `-MD $DEP_FILE`` + # to ASM_COMPILER. both nasm and GNU assembler accepts this option, but + # somehow the ninja generator fails to pass the argument. so + # just drop it. + shift + ;; + -W* ) + # Warning/error option + shift + ;; + -f* ) + shift + ;; + -I | -isystem ) + shift + refine_nasm_options+=" -i $1" + shift + ;; + -O* ) + # ignore C optimisations + shift + ;; + * ) + # Keep other options + refine_nasm_options+=" $1" + shift + ;; + esac +done + +nasm $refine_nasm_options + +true -- cgit v1.2.3