]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
nasm-wrapper: swallow -MD option
authorKefu Chai <kchai@redhat.com>
Thu, 4 Mar 2021 08:06:51 +0000 (16:06 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 9 Mar 2021 11:13:22 +0000 (19:13 +0800)
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 <kchai@redhat.com>
src/nasm-wrapper

index 9e950ff5861662f2279354fa0a6ac624bbb8c65f..71eb8246a7b7b9796d35e5fcdf26861767b32555 100755 (executable)
@@ -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 <DEPFILE> argument. so
+        # just drop it.
+        shift
+        ;;
     -W* )
         # Warning/error option
         shift