[PATCH] D144603: Add option to disable compiler launcher on external projects

2023-03-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I agree, in that case let's remove `C_COMPILER_LAUNCHER;CXX_COMPILER_LAUNCHER` from the list of default passthrough variables which seems like a reasonable default, and provide `CLANG_BOOTSTRAP_EXTRA_PASSTHROUGH` so developers have a way to pass these through to the next

[PATCH] D144603: Add option to disable compiler launcher on external projects

2023-03-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D144603#4162974 , @haowei wrote: > I think remove the compiler launcher from default pass through flags are > fine. What about the using compiler launcher in runtime builds? I don't think > we should read `CLANG_BOOTSTRAP_PASS

[PATCH] D144603: Add option to disable compiler launcher on external projects

2023-03-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D144603#4165569 , @fangism wrote: > In D144603#4163751 , @phosek wrote: > >> In D144603#4162974 , @haowei wrote: >> >>> I think remove the compi

[PATCH] D145187: [Fuchsia] Add other necessary components to LLDB install.

2023-03-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145187/new/ https://reviews.llvm.org/D145187 ___

[PATCH] D145411: [WIP][Fuchsia] Include baremetal ARM builtins

2023-03-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. Herald added subscribers: abrachet, kristof.beyls. Herald added a project: All. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145411 Fi

[PATCH] D145449: [Fuchsia] Add LLDB options to stage 1 cmake.

2023-03-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. > LLVM_ENABLE_PROJECTS is automatically forwarded from stage 1 builds to > stage 2 builds, so setting FUCHSIA_ENABLE_LLDB has no effect on > two-stage builds. That shouldn't be the case, do you know where it's being passed through? Repository: rG LLVM Github Monorepo

[PATCH] D145449: [Fuchsia] Add LLDB options to stage 1 cmake.

2023-03-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D145449#4175864 , @phosek wrote: >> LLVM_ENABLE_PROJECTS is automatically forwarded from stage 1 builds to >> stage 2 builds, so setting FUCHSIA_ENABLE_LLDB has no effect on >> two-stage builds. > > That shouldn't be the case, d

[PATCH] D145818: [Fuchsia] Add LLDB to CLANG_BOOTSTRAP_TARGETS.

2023-03-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145818/new/ https://reviews.llvm.org/D145818 ___

[PATCH] D145999: [RISCV] Reserve X18 by default for Android

2023-03-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145999/new/ https://reviews.llvm.org/D145999 ___

[PATCH] D142905: [Driver] Change multilib selection algorithm

2023-03-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I have just one comment related to efficiency, but if it turns out to be too difficult to address, I'd be also fine landing this change as is and addressing that issue in a follow up change. Comment at: clang/lib/Driver/MultilibBuilder.cpp:94-100 + Mu

[PATCH] D142932: Multilib YAML parsing

2023-03-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/Multilib.cpp:137 +struct MultilibSetSerialization { + std::string ClangMinimumVersion; + std::vector Multilibs; Can we use a separate versioning scheme rather than tying the version to Clang? That is s

[PATCH] D142933: Add -print-multi-selection-tags-experimental option

2023-03-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChain.cpp:237-245 + // Enumerate boolean flags we care about for the purposes of multilib here. + // There must be a smarter way to do it but this gets us started. + const struct HasFlag { +ID Pos, Neg; +bo

[PATCH] D142986: Enable multilib.yaml in the BareMetal ToolChain

2023-03-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:184 + SmallString<128> MultilibPath(SysRootDir); + llvm::sys::path::append(MultilibPath, MULTILIB_YAML_FILENAME); + Rather than hardcoding the filename and the location, which i

[PATCH] D148869: [Driver][BareMetal] Support --emit-static-lib in BareMetal driver

2023-06-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek marked an inline comment as done. phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:170 bool BareMetal::handlesTarget(const llvm::Triple &Triple) { return isARMBareMetal(Triple) || isAArch64BareMetal(Triple) || isRISCVBareMet

[PATCH] D148869: [Driver][BareMetal] Support --emit-static-lib in BareMetal driver

2023-06-26 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. phosek marked an inline comment as done. Closed by commit rG5614d1a0a10d: [Driver][BareMetal] Support --emit-static-lib in BareMetal driver (authored by phosek). Chang

[PATCH] D153931: [Fuchsia] Enable libcxx filesystem on Windows build.

2023-06-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153931/new/ https://reviews.llvm.org/D153931 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-06-28 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: smeenai, beanz. Herald added subscribers: Enna1, abrachet, dberris. Herald added a project: All. phosek requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. On Linux crt

[PATCH] D153989: [compiler-rt] Move crt into builtins

2023-06-28 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 535452. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153989/new/ https://reviews.llvm.org/D153989 Files: compiler-rt/CMakeLists.txt compiler-rt/cmake/builtin-config-ix.cmake compiler-rt/lib/CMakeLists.txt

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-06-28 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/UEFI.cpp:57 + CmdArgs.push_back("-nologo"); + + if (Args.hasArg(options::OPT_g_Group, options::OPT__SLASH_Z7)) We should be also passing `-subsystem:efi_application`. Note that COFF also has

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-06-28 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. For comments that are already address, it's customary to mark those as "Done" to make it clear. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152206/new/ https://reviews.llvm.org/D152206 ___

[PATCH] D154014: [SpecialCaseList] Use Globs instead of Regex

2023-06-30 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. If we want to support both regular expressions and glob patterns permanently, then a solution like `#!regex` or `#!glob` is likely the way to go. If we want to allow soft-transition, then we could do something like `#!special-case-list-v2`, where v1 would support regular

[PATCH] D147834: [clang][driver] Pass `-femulated-tls` through to the linker in LTO mode

2023-04-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147834/new/ https://reviews.llvm.org/D147834 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D150752: [BOLT][CMake] Use correct output paths and passthrough necessary options

2023-05-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: bolt/CMakeLists.txt:88 + if(CMAKE_SYSROOT) +list(APPEND extra_args -DCMAKE_SYSROOT=${CMAKE_SYSROOT}) + endif() michaelplatings wrote: > phosek wrote: > > michaelplatings wrote: > > > michaelplatings wrote: > > > > T

[PATCH] D150752: [BOLT][CMake] Use correct output paths and passthrough necessary options

2023-05-19 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9e6e3375f12e: [BOLT][CMake] Use correct output paths and passthrough necessary options (authored by phosek). Repository: rG LLVM Github Monorepo

[PATCH] D151186: [Driver] Properly handle -pie and -nopie on Fuchsia

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: phosek. Herald added a subscriber: abrachet. Herald added a project: All. phosek requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Prior to this patch we would ignore -pie and -no

[PATCH] D151186: [Driver] Properly handle -pie and -nopie on Fuchsia

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 524599. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151186/new/ https://reviews.llvm.org/D151186 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/CommonArgs.h clang/lib/Driver

[PATCH] D151186: [Driver] Properly handle -pie and -nopie on Fuchsia

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 524601. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151186/new/ https://reviews.llvm.org/D151186 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/CommonArgs.h clang/lib/Driver

[PATCH] D151186: [Driver] Properly handle -pie and -nopie on Fuchsia

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 524602. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151186/new/ https://reviews.llvm.org/D151186 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/CommonArgs.h clang/lib/Driver

[PATCH] D146757: [Driver] Enable defining multilib flags verbatim

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I apologize about the delayed response. I had time to think about this a bit more and it's not really clear to me if we need to preserve the "plus/minus" flag syntax. Looking through the history, it seems that it was introduced in D2538 w

[PATCH] D142932: Multilib YAML parsing

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/include/clang/Driver/Multilib.h:150-152 + bool parseYaml(llvm::MemoryBufferRef, + llvm::SourceMgr::DiagHandlerTy = nullptr, + void *DiagHandlerCtxt = nullptr); Rather than `parseYaml

[PATCH] D142986: Enable multilib.yaml in the BareMetal ToolChain

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:180 + SmallString<128> SysRootDir(D.Dir); + llvm::sys::path::append(SysRootDir, "../lib/clang-runtimes"); + Defer to `llvm::sys::path::append` for joining the path components to

[PATCH] D143075: BareMetal ToolChain multilib layering

2023-05-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:228 + +llvm::SmallVector BareMetal::getOrderedMultilibs() const { + // Get multilibs in reverse order because they're ordered most-specific last. Can you use [llvm::reverse](htt

[PATCH] D151186: [Driver] Properly handle -pie and -nopie on Fuchsia

2023-05-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. That alias is already recognized by the GNU driver. I'm sharing the implementation between the two drivers. Would you prefer to reject `-nopie` when targeting Fuchsia? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151186/ne

[PATCH] D151186: [Driver] Properly handle -pie and -nopie on Fuchsia

2023-05-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D151186#4369203 , @MaskRay wrote: > In D151186#4369181 , @phosek wrote: > >> That alias is already recognized by the GNU driver. I'm sharing the >> implementation between the two driver

[PATCH] D150939: [CMake] Remove BOLT from Fuchsia toolchain

2023-05-30 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 526836. phosek added a reviewer: haowei. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150939/new/ https://reviews.llvm.org/D150939 Files: clang/cmake/caches/Fuchsia-stage2.cmake Index: clang/cmake/caches/Fuc

[PATCH] D150939: [CMake] Remove BOLT from Fuchsia toolchain

2023-05-30 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGaf4da3d74630: [CMake] Remove BOLT from Fuchsia toolchain (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D151595: [BOLT][CMake] Redo the build and install targets

2023-05-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 526948. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151595/new/ https://reviews.llvm.org/D151595 Files: bolt/CMakeLists.txt bolt/cmake/

[PATCH] D151595: [BOLT][CMake] Redo the build and install targets

2023-05-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 527084. phosek marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151595/new/ https://reviews.llvm.org/D151595 Files: bolt/CMakeLists.txt bolt/cmake/modules/AddBOLT.cmake bolt/t

[PATCH] D151595: [BOLT][CMake] Redo the build and install targets

2023-05-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @Amir does this change look good to you? Comment at: bolt/tools/heatmap/CMakeLists.txt:8 -add_bolt_tool(llvm-bolt-heatmap +add_bolt_executable(llvm-bolt-heatmap heatmap.cpp smeenai wrote: > Why this change? This tool wasn't previous

[PATCH] D151595: [BOLT][CMake] Redo the build and install targets

2023-05-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 527243. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151595/new/ https://reviews.llvm.org/D151595 Files: bolt/CMakeLists.txt bolt/cmake/modules/AddBOLT.cmake bolt/test/CMakeLists.txt bolt/tools/CMakeList

[PATCH] D151595: [BOLT][CMake] Redo the build and install targets

2023-05-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek marked 2 inline comments as done. phosek added inline comments. Comment at: bolt/test/CMakeLists.txt:40 llvm-bolt - llvm-boltdiff llvm-bolt-heatmap Amir wrote: > We have a number of dependencies on llvm-boltdiff and perf2bolt, e.g. in > internal an

[PATCH] D151595: [BOLT][CMake] Redo the build and install targets

2023-05-31 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf99a7d3e3809: [BOLT][CMake] Redo the build and install targets (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D151595: [BOLT][CMake] Redo the build and install targets

2023-06-01 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf3269a94e729: [BOLT][CMake] Redo the build and install targets (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151595/new/ https://revie

[PATCH] D152057: [CMake][Fuchsia] Add LLVM_ENABLE_HTTPLIB to Stage 2 build

2023-06-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152057/new/ https://reviews.llvm.org/D152057 ___

[PATCH] D142893: [NFC] Class for building MultilibSet

2023-02-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/include/clang/Driver/Multilib.h:35-39 std::string GCCSuffix; std::string OSSuffix; std::string IncludeSuffix; flags_list Flags; int Priority; Since this class is intended to be immutable, we should al

[PATCH] D142932: [NFC] Multilib YAML parsing

2023-02-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Do you know if regular expressions are necessary to cover the existing use cases? In our experience, while regular expressions are powerful, they also tend to be error prone and more difficult to reason about. Would glob patterns that are implemented by https://github.c

[PATCH] D143794: [Fuchsia] Add FUCHSIA_ENABLE_LLDB option.

2023-02-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143794/new/ https://reviews.llvm.org/D143794 ___

[PATCH] D143960: [Fuchsia] Set /winsysroot in windows runtimes linker flags

2023-02-14 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:91 set(WINDOWS_LINK_FLAGS -/vfsoverlay:${LLVM_VFSOVERLAY} -# TODO: On Windows, linker is invoked

[PATCH] D142893: [NFC] Class for building MultilibSet

2023-02-14 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/include/clang/Driver/MultilibBuilder.h:117 + /// Add an optional Multilib segment + MultilibSetBuilder &Maybe(const MultilibBuilder &M); + --

[PATCH] D142932: [NFC] Multilib YAML parsing

2023-02-14 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. For the existing YAML files within LLVM, we most commonly used the `PascalCase` for field names and less commonly `lisp-case`. This change uses `camelCase` which is unusual and unless there's a particular reason for using this scheme such as compatibility with an existin

[PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-02-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144509/new/ https://reviews.llvm.org/D144509 ___

[PATCH] D143666: [Clang] Fix clang_rt tests when LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is ON

2023-02-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I missed this change so I apologize for late response, but can you elaborate on why this is needed? Clang first checks the name without architecture and if the file doesn't exist then it'll return the one with architecture unconditionally, see https://github.com/llvm/ll

[PATCH] D143666: [Clang] Fix clang_rt tests when LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is ON

2023-02-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D143666#4143702 , @michaelplatings wrote: > I'm happy to revert this and add `--sysroot` if you prefer. That would fit > with keeping the tests hermetic. That would be my preference and it would match what we do in other Clan

[PATCH] D144542: [Clang] Improve hermeticity of clang_rt tests

2023-02-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144542/new/ https://reviews.llvm.org/D144542

[PATCH] D143052: [CMake] Unify llvm_check_linker_flag and llvm_check_compiler_linker_flag

2023-02-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 499561. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143052/new/ https://reviews.llvm.org/D143052 Files: clang/tools/driver/CMakeLists.txt

[PATCH] D142905: [Driver] Change multilib selection algorithm

2023-02-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/include/clang/Driver/Multilib.h:41 + flag_set Flags; + arg_list PrintArgs; This is just a suggestion, but GCC documentation refers to these as either "options" or "switches", not "args" so I think it might be h

[PATCH] D131618: [clang][llvm][lld] FatLTO Prototype

2023-02-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: lld/test/ELF/fatlto/Inputs/a-fatLTO.yaml:23 +AddressAlign:0x1 +Content: 4243C0DE35140500620C30244D59BE669DFBB44F1BC8244401320500210C7B020B022100020016000781239141C80449061032399201840C250508191

[PATCH] D150752: [bolt] Use correct output paths and passthrough necessary options

2023-05-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: Amir. Herald added subscribers: treapster, ayermolo, abrachet. Herald added a reviewer: rafauler. Herald added a reviewer: maksfb. Herald added a project: All. phosek requested review of this revision. Herald added subscribers: cfe-commits, yot

[PATCH] D150939: [CMake] Remove BOLT from Fuchsia toolchain

2023-05-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: abrachet. Herald added a subscriber: ekilmer. Herald added a project: All. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fuchsia toolchain is currently broken due to https://gi

[PATCH] D150752: [bolt] Use correct output paths and passthrough necessary options

2023-05-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 523691. phosek marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150752/new/ https://reviews.llvm.org/D150752 Files: bolt/CMakeLists.txt bolt/runtime/CMakeLists.txt clang/cmake

[PATCH] D150752: [bolt] Use correct output paths and passthrough necessary options

2023-05-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: bolt/CMakeLists.txt:88 + if(CMAKE_SYSROOT) +list(APPEND extra_args -DCMAKE_SYSROOT=${CMAKE_SYSROOT}) + endif() michaelplatings wrote: > michaelplatings wrote: > > The [[ > > https://cmake.org/cmake/help/latest/vari

[PATCH] D148760: [Driver] Support response file on baremetal driver

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: abrachet, mcgrathr. Herald added a project: All. phosek requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. All officially supported linkers should support response files and this av

[PATCH] D148383: [driver] Enable response file when using lld on baremetal targets

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I think we can enable the use of response files unconditionally since it should be supported by all officially supported linkers. This matches the logic used by other driver classes such as `Gnu`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D148763: [Driver] Support response file in Fuchsia driver

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: abrachet, mcgrathr. Herald added a project: All. phosek requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. All officially supported linkers should support response files and this av

[PATCH] D148763: [Driver] Support response file in Fuchsia driver

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9ba3a2280398: [Driver] Support response file in Fuchsia driver (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D148760: [Driver] Support response file on baremetal driver

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG038536acaf27: [Driver] Support response file on baremetal driver (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D148383: [driver] Enable response file when using lld on baremetal targets

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek abandoned this revision. phosek added a comment. Addressed by D148760 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148383/new/ https://reviews.llvm.org/D148383 ___

[PATCH] D148751: [CMake] Add llvm-lib to Clang bootstrap dependency for LTO builds on Windows

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148751/new/ https://reviews.llvm.org/D148751 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D148556: [libcxxabi][demangle] create helper for std::string_view::starts_with

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148556/new/ https://reviews.llvm.org/D148556 ___

[PATCH] D148387: remove Demangle/StringView.h

2023-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148387/new/ https://reviews.llvm.org/D148387 ___

[PATCH] D148869: [Driver][BareMetal] Support --emit-static-lib in BareMetal driver

2023-04-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: abrachet. Herald added a project: All. phosek requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. This allows building static libraries with Clang driver. Repository: rG LLVM Gi

[PATCH] D148945: [clang] Remove workaround for old LLVM_ENABLE_PROJECTS=libcxx build

2023-04-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148945/new/ https://reviews.llvm.org/D148945 ___

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757 ___

[PATCH] D148954: [clang] Make access to submodules via `iterator_range`

2023-04-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148954/new/ https://reviews.llvm.org/D148954 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D148961: [clang] Remove unnecessary virtual inheritance in `TargetInfo`

2023-04-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148961/new/ https://reviews.llvm.org/D148961 ___

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I wasn't aware that `debug-prefix-map` prefers longest prefix. I agree that ideally `coverage-prefix-map`, `debug-prefix-map` and `macro-prefix-map` should be consistent across all LLVM tools and ideally also across compilers. Repository: rG LLVM Github Monorepo CHAN

[PATCH] D144603: Disable compiler launcher on external projects and multi stage clang

2023-04-24 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144603/new/ https://reviews.llvm.org/D144603 ___

[PATCH] D149119: [CMake] Use llvm-nm to extract symbols for staged LTO builds on Windows

2023-04-25 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Supporting only a single tool and simplifying the script would be my preference as well. I see that the script already supports `llvm-readobj`, do we need the `llvm-nm` support in that case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D149206: [clang][driver] Enable MisExpect diagnostics flag outside of CC1

2023-04-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149206/new/ https://reviews.llvm.org/D149206 ___

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-04-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Do we have any way to check if there are projects out there that use `-dumpbase`? It shouldn't be too difficult to support it, but we should find out first if it's needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14919

[PATCH] D149458: [Driver] Pass --target2= to linker from baremetal toolchain

2023-04-28 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149458/new/ https://reviews.llvm.org/D149458 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D131594: WORK IN PROGRESS Add Clang UEFI target to support "x86_64-unknown-uefi" triple

2023-06-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I'd split the `llvm/` changes into a separate change. Comment at: clang/lib/Driver/ToolChains/UEFI.cpp:58-59 + !C.getDriver().IsCLMode() && !C.getDriver().IsFlangMode()) { +CmdArgs.push_back("-defaultlib:libcmt"); +CmdArgs.push_back("-defaul

[PATCH] D131594: Add Clang UEFI target to support "x86_64-unknown-uefi" triple

2023-06-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I'd omit the lit test cases for now since they're not necessary. There should be a test case in https://github.com/llvm/llvm-project/blob/86b6ac5d54d7fe5cd21beff64b5c2194b1368bdf/llvm/unittests/TargetParser/TripleTest.cpp though. Repository: rG LLVM Github Monorepo

[PATCH] D131594: [Triple] Add triple for UEFI

2023-06-05 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. Can you also provide description for this change (this should be the same you'll use for the Git message). Comment at: llvm/include/llvm/MC/TargetRegistry.h:568 + asser

[PATCH] D152318: [Fuchsia] Add llvm-strings to Fuchsia clang build

2023-06-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152318/new/ https://reviews.llvm.org/D152318 ___

[PATCH] D151437: [NFC][Driver] Change MultilibBuilder interface

2023-06-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/include/clang/Driver/MultilibBuilder.h:80 + /// \p Flag must be a flag accepted by the driver. + MultilibBuilder &flag(bool Required, StringRef Flag); I think it would be cleaner to swap the order of arguments a

[PATCH] D142932: Multilib YAML parsing

2023-06-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. The only remaining concern I have is about the YAML schema, specifically the naming of `Regex`, `MatchFlags` and `NoMatchFlags` fields. Specifically, I think it something like this might be cleaner: FlagMap: - Match: --target=thumbv8(\.[0-9]+)?m\.base-none-unknown-ea

[PATCH] D142933: Add -print-multi-selection-flags-experimental option

2023-06-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChain.cpp:250-285 + // Enumerate boolean flags we care about for the purposes of multilib here. + // There must be a smarter way to do it but this gets us started. + const struct HasFlag { +ID Pos, Neg; +bo

[PATCH] D142933: Add -print-multi-selection-flags-experimental option

2023-06-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/include/clang/Driver/Options.td:4261 def print_multi_lib : Flag<["-", "--"], "print-multi-lib">; +def print_multi_selection_flags : Flag<["-", "--"], "print-multi-selection-flags-experimental">, + HelpText<"Print the flags used f

[PATCH] D142986: Enable multilib.yaml in the BareMetal ToolChain

2023-06-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:176 + +#define MULTILIB_YAML_FILENAME "multilib.yaml" + This is not idiomatic, I couldn't find any instance of `#define` for string literals anywhere in LLVM. I believe the idiom

[PATCH] D143075: BareMetal ToolChain multilib layering

2023-06-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:242-246 + // No multilibs selected so return a single default multilib. + static llvm::SmallVector Default = {Multilib()}; + return llvm::iterator_range< + llvm::SmallVector::const_reverse

[PATCH] D152206: [Basic] Support 64-bit x86 target for UEFI

2023-06-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This needs a lit test. Comment at: clang/lib/Driver/ToolChains/UEFI.cpp:92-97 + StringRef Linker = + Args.getLastArgValue(options::OPT_fuse_ld_EQ, CLANG_DEFAULT_LINKER); + if (Linker.empty() || Linker.equals_insensitive("lld")) +Linker = "lld-

[PATCH] D152279: [Driver] Default -msmall-data-limit= to 0

2023-06-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. We're planning to default to `-msmall-data-limit=0` for Android and Fuchsia so I'm supportive of this change because it means less complexity and fewer differences between platforms. I think it would be worth bringing up this topic at the RISC-V LLVM sync-up call tomorr

[PATCH] D152418: [clang] set python3 as required build dependency

2023-06-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152418/new/ https://reviews.llvm.org/D152418 ___

[PATCH] D142933: [Driver] Add -print-multi-flags-experimental option

2023-06-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/ https://reviews.llvm.org/D142933 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D142986: Enable multilib.yaml in the BareMetal ToolChain

2023-06-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142986/new/ https://reviews.llvm.org/D142986 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D143059: [Driver] Enable selecting multiple multilibs

2023-06-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143059/new/ https://reviews.llvm.org/D143059 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D142932: Multilib YAML parsing

2023-06-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. In D142932#4402981 , @michaelplatings wrote: > @phosek thanks for your suggestion, that's now implemented. In practise for > LLVM Embedded Toolchain for Arm we haven't yet needed `NoMatchFlags` so I

[PATCH] D152353: [NFC][Driver] Change MultilibBuilder flags argument order

2023-06-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM thanks! Comment at: clang/include/clang/Driver/MultilibBuilder.h:80 + /// \p Negate defines whether the flag is negated and therefore disallowed. + MultilibBuilder &fl

[PATCH] D143075: BareMetal ToolChain multilib layering

2023-06-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. LGTM Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:236-240 + if (!SelectedMultilibs.empty()) { +return llvm::iterator_range< +llvm::SmallVector::const_reverse_iterator>( +SelectedMultilibs.rbegi

<    9   10   11   12   13   14   15   16   17   >