[clang] [clang] Fix --entry command line option (PR #69114)
Sergei Barannikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 22 10:13:36 PDT 2026
================
@@ -20,3 +20,10 @@
// Make sure that we do warn in other cases.
// RUN: %clang %s -lfoo -c -o %t/tmp2.o -### 2>&1 | FileCheck %s --check-prefix=UNUSED
// UNUSED: warning:{{.*}}unused
+
+// Make sure -e and its aliases --entry and --entry= are properly passed on.
+// RUN: %clang -### -target x86_64-unknown-linux-gnu --entry test %s 2>&1 | FileCheck --check-prefix=ENTRY %s
+// RUN: %clang -### -target x86_64-unknown-linux-gnu --entry=test %s 2>&1 | FileCheck --check-prefix=ENTRY %s
+// RUN: %clang -### -target x86_64-unknown-linux-gnu -etest %s 2>&1 | FileCheck --check-prefix=ENTRY %s
----------------
s-barannikov wrote:
Re: CI failure
gcc accepts both `-etest` and `-e test`. Currently, we support only the second variant. If we want to support the first variant, the `def e` should be changed to `JoinedOrSeparate`. If we don't, this line should be changed to pass `-e test`.
https://github.com/llvm/llvm-project/pull/69114
More information about the cfe-commits
mailing list