[lld] [Support] Better error msg when cache dir can't be created. (PR #69575)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 14:33:04 PDT 2023


================
@@ -0,0 +1,20 @@
+; REQUIRES: x86
+;; Not supported on windows since we use permissions to deny the creation
+; UNSUPPORTED: system-windows
+
+; RUN: opt -module-hash -module-summary %s -o %t.o
+; RUN: opt -module-hash -module-summary %p/Inputs/lto-cache.ll -o %t2.o
+; RUN: rm -Rf %t.cache && mkdir %t.cache
+; RUN: chmod 444 %t.cache
+
+;; Check emit warnings when we can't create the cache dir
+; RUN: not --crash lld-link /lldltocache:%t.cache/cache /out:%t3 /entry:main %t2.o %t.o 2>&1 | FileCheck %s
----------------
aeubanks wrote:

make the cache dir name something weirder like `nonexistant` and check that it appears below like `can't create cache directory: {{.*}}nonexistant`

https://github.com/llvm/llvm-project/pull/69575


More information about the llvm-commits mailing list