]> 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>
Sun, 5 Jan 2020 19:15:33 +0000 (20:15 +0100)
(cherry picked from commit c9530b9d423b3e1b52f2fb7b3cf3376eb3044384)

test/suites/base.bash

index 168a480cdd3678f5c26916db911d7f9e0dc047ca..f5cc1fecf59f00887029e6d1433baaf95c268044 100644 (file)
@@ -1088,10 +1088,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
@@ -1099,6 +1100,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"