]> git.proxmox.com Git - ceph.git/blame - ceph/src/nasm-wrapper
check in ceph 17.2.3 sources
[ceph.git] / ceph / src / nasm-wrapper
CommitLineData
f67539c2
TL
1#!/usr/bin/env bash
2
3set -e
4
5refine_nasm_options=""
6while [ -n "$*" ]; do
7 case "$1" in
8 -f )
9 shift
20effc67 10 refine_nasm_options+=" -f $1"
f67539c2
TL
11 shift
12 ;;
13 -c | --param* | -m* | -pipe | -thread )
14 # unknown options under nasm & yasm
15 shift
16 ;;
17 -g* )
18 # ignore debug format
19 shift
20 ;;
20effc67
TL
21 -MD )
22 # before CMake v3.18, its ninja build rule always passes `-MD $DEP_FILE``
23 # to ASM_COMPILER. both nasm and GNU assembler accepts this option, but
24 # somehow the ninja generator fails to pass the <DEPFILE> argument. so
25 # just drop it.
26 shift
27 ;;
f67539c2
TL
28 -W* )
29 # Warning/error option
30 shift
31 ;;
32 -f* )
33 shift
34 ;;
35 -I | -isystem )
36 shift
20effc67 37 refine_nasm_options+=" -i $1"
f67539c2
TL
38 shift
39 ;;
40 * )
41 # Keep other options
20effc67 42 refine_nasm_options+=" $1"
f67539c2
TL
43 shift
44 ;;
45 esac
46done
47
48nasm $refine_nasm_options
49
50true