]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Test .incbin detection for assembler compilation
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 29 Dec 2019 19:06:32 +0000 (20:06 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 2 Jan 2020 20:06:13 +0000 (21:06 +0100)
test/suites/base.bash

index a8d8acdc4f3d6ad5ec24308993f7454aa3d21077..5df538c530ef939b1a77d50dac84929475a5dbcd 100644 (file)
@@ -1060,10 +1060,11 @@ EOF
     fi
 
     # -------------------------------------------------------------------------
+if ! $HOST_OS_WINDOWS; then
     TEST ".incbin"
 
     cat <<EOF >incbin.c
-char x[] = ".incbin";
+__asm__(".incbin \"/dev/null\"");
 EOF
 
     $CCACHE_COMPILE -c incbin.c
@@ -1071,6 +1072,16 @@ EOF
     expect_stat 'cache miss' 0
     expect_stat 'unsupported code directive' 1
 
+    cat <<EOF >incbin.s
+.incbin "/dev/null";
+EOF
+
+    $CCACHE_COMPILE -c incbin.s
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 0
+    expect_stat 'unsupported code directive' 2
+fi
+
     # -------------------------------------------------------------------------
     TEST "UNCACHED_ERR_FD"