Avoid calling getenv in the MC layer and let the clang driver do it so that it is reflected in the command-line as an -mllvm option.
rdar://101558354
Paths
| Differential D136888
Move getenv for AS_SECURE_LOG_FILE to clang ClosedPublic Authored by benlangmuir on Oct 27 2022, 2:40 PM.
Details
Summary Avoid calling getenv in the MC layer and let the clang driver do it so that it is reflected in the command-line as an -mllvm option. rdar://101558354
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 27 2022, 2:40 PM
Comment Actions If we have to fix it, I slightly prefer just give it a proper option in CodeGenOption and a cc1 and cc1as flag.
Comment Actions
This revision is now accepted and ready to land.Oct 28 2022, 10:00 AM Comment Actions
This revision was landed with ongoing or failed builds.Oct 28 2022, 4:08 PM Closed by commit rGe1f998302276: Move getenv for AS_SECURE_LOG_FILE to clang (authored by benlangmuir). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 471680 clang/include/clang/Basic/CodeGenOptions.h
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CodeGen/as-secure-log-file.c
clang/test/Misc/cc1as-as-secure-log-file.s
clang/tools/driver/cc1as_main.cpp
llvm/include/llvm/MC/MCContext.h
llvm/include/llvm/MC/MCTargetOptions.h
llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h
llvm/lib/MC/MCContext.cpp
llvm/lib/MC/MCParser/DarwinAsmParser.cpp
llvm/lib/MC/MCTargetOptionsCommandFlags.cpp
llvm/test/MC/AsmParser/secure_log_unique.s
|
--target= for new tests
remove unused -o %t.o