[PATCH] D136717: [clang] Move getenv call for SOURCE_DATE_EPOCH out of frontend NFC
Ben Langmuir via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 24 15:38:25 PST 2023
benlangmuir added inline comments.
================
Comment at: clang/test/Driver/SOURCE_DATE_EPOCH.c:2
+// RUN: %clang -E %s -### 2>&1 | FileCheck %s -check-prefix=NO_EPOCH
+// NO_EPOCH-NOT: "-source-date-epoch"
+
----------------
tstellar wrote:
> Hi @benlangmuir, this test fails in our build environment, because we have the SOURCE_DATE_EPOCH env variable set globally. Is there any way to update the test to handle this scenario?
I'm not aware of a portable way to unset environment variables (`env -u` doesn't work on some of our platforms) and this first check is low-value anyway, so I'm fine with just dropping it and only having the ones below that explicitly set a value. https://reviews.llvm.org/D142511
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136717/new/
https://reviews.llvm.org/D136717
More information about the cfe-commits
mailing list