[llvm] [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:34:31 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:

also the `--crash` is worrying, I'm guessing there's some `report_fatal_error` somewhere where we should be passing `false` as the second param to not treat it as a crash but a user error, and we should have a followup change to fix that?

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


More information about the llvm-commits mailing list