From: Kefu Chai Date: Thu, 4 Mar 2021 08:06:51 +0000 (+0800) Subject: nasm-wrapper: swallow -MD option X-Git-Tag: v17.1.0~2681^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1cc3fa5da87a9c861e74e6a7d0d0a4e87de1ce80;p=ceph.git nasm-wrapper: swallow -MD option see also - https://discourse.cmake.org/t/cmake-generating-invalid-ninja-build-rules-for-asm/1389 - https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4460 - https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4838 Signed-off-by: Kefu Chai --- diff --git a/src/nasm-wrapper b/src/nasm-wrapper index 9e950ff586166..71eb8246a7b7b 100755 --- a/src/nasm-wrapper +++ b/src/nasm-wrapper @@ -18,6 +18,13 @@ while [ -n "$*" ]; do # 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