]> git.proxmox.com Git - ceph.git/blob - ceph/src/nasm-wrapper
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / nasm-wrapper
1 #!/usr/bin/env bash
2
3 set -e
4
5 refine_nasm_options=""
6 while [ -n "$*" ]; do
7 case "$1" in
8 -f )
9 shift
10 refine_nasm_options+=" -f $1"
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 ;;
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 ;;
28 -W* )
29 # Warning/error option
30 shift
31 ;;
32 -f* )
33 shift
34 ;;
35 -I | -isystem )
36 shift
37 refine_nasm_options+=" -i $1"
38 shift
39 ;;
40 -O* )
41 # ignore C optimisations
42 shift
43 ;;
44 * )
45 # Keep other options
46 refine_nasm_options+=" $1"
47 shift
48 ;;
49 esac
50 done
51
52 nasm $refine_nasm_options
53
54 true