[PATCH] D39017: [CMake] Build Fuchsia toolchain as -O3

2017-10-17 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. LGTM Since we use lld, -Wl,-O2 also helps make the binaries smaller. Repository: rL LLVM https://reviews.llvm.org/D39017 ___ cfe-commits m

[PATCH] D39176: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. This seems like how it always should have been, since -fuse-ld=lld sets it to ld.lld, not lld. Looks to me like the existing MipsLinux and WebAssembly implementations are wrong too and onl

[PATCH] D39270: [CMake] Include clang-refactor in Fuchsia toolchain

2017-10-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D39270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D39273: [CMake] Build host builtins in Fuchsia toolchain even on Darwin

2017-10-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D39273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D51573: [Driver] Search LibraryPaths when handling -print-file-name

2018-09-01 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. The log message could give concrete examples. Comment at: clang/lib/Driver/Driver.cpp:4169 std::string Driver::GetFilePath(StringRef Name, const ToolChain &TC) const { -

[PATCH] D51329: [Attribute/Diagnostics] Print macro instead of whole attribute for address_space

2018-09-04 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: lib/Parse/ParseDecl.cpp:244-252 +// If this was declared in a macro, attatch the macro IdentifierInfo to the +// parsed attribute. +for (const auto &MacroPair : PP.getAttributeMacros()) { + if (SourceLocInSourceRange(At

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-27 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. I think this wants to be a hard error rather than a warning. Though since we use -Werror anyway if others feel strongly contrary I won't object. Repository: rC Clang https://reviews.llvm.org/D49511 ___ cfe-commits mail

[PATCH] D41471: [CMake][Fuchsia] Enable assertions

2017-12-20 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added a reviewer: phosek. Herald added a subscriber: mgorny. Enable assertions in both stages. Release+Asserts is fast enough. No need to let insanity through. Repository: rC Clang https://reviews.llvm.org/D41471 Files: cmake/caches/Fuchsia-stage2.c

[PATCH] D43992: [Frontend] Avoid including default system header paths on Fuchsia

2018-03-01 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D43992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D44605: [Driver] Default to DWARF 5 for Fuchsia

2018-03-18 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. We aren't actually using DWARF 5 yet AFAICT. Our builds don't pass -gdwarf-5. So I'm not sure we have yet verified that all the DWARF-consuming tools people are using with Fuchsia binaries can handle all of DWARF 5 (which has several major format changes). I'd certa

[PATCH] D47668: [Driver][Fuchsia] Pass LTO flags to linker

2018-06-04 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D47668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D47758: [Fuchsia] Include install-distribution-stripped in bootstrap targets

2018-06-05 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D47758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D48208: [Fuchsia] Enable static libc++, libc++abi, libunwind

2018-06-15 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D48208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D53487: [Driver] Support sanitized libraries on Fuchsia

2018-10-23 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:566 + for (const auto &LibPath : TC.getLibraryPaths()) { +if(LibPath.length() > 0) { + SmallString<1

[PATCH] D53854: [Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia

2018-10-30 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:125 !Args.hasArg(options::OPT_static); +CmdArgs.push_back("-push-state

[PATCH] D56652: [CMake][Fuchsia] Synchronize first and second stage builds

2019-01-14 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56652/new/ https://reviews.llvm.org/D56652 ___ cfe-commit

[PATCH] D56972: [CMake][Fuchsia] Drop -DNDEBUG, re-enable modules

2019-01-20 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56972/new/ https://reviews.llvm.org/D56972 ___ cfe-commit

[PATCH] D53787: [Sema] Use proper visibility for global new and delete declarations

2018-10-31 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. In https://reviews.llvm.org/D53787#1279899, @rsmith wrote: > Replacing the global new and delete is supposed to be a whole-program > operation (you only get one global allocator). Otherwise you couldn't > allocate memory in one DSO and deallocate it in another. (And no

[PATCH] D53787: [Sema] Use proper visibility for global new and delete declarations

2018-10-31 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. In https://reviews.llvm.org/D53787#1282975, @rsmith wrote: > These symbols really are special. Other symbols are introduced explicitly by > a declaration, whereas these are declared implicitly by the compiler. The implicit declaration is the only difference that actua

[PATCH] D53787: [Sema] Provide -fvisibility-global-new-delete-hidden option

2018-10-31 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. In https://reviews.llvm.org/D53787#1283051, @rsmith wrote: > In https://reviews.llvm.org/D53787#1282995, @mcgrathr wrote: > > > In https://reviews.llvm.org/D53787#1282975, @rsmith wrote: > > > > > Other symbols must have exactly one definition (modulo the permission for

[PATCH] D53970: [CMake][Fuchsia] Don't restrict Linux runtimes to UNIX

2018-11-01 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D53970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D54026: [CMake][Fuchsia] Set -fuse-ld=lld explicitly for Linux runtimes

2018-11-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. So the default is not per-target? It should be. Repository: rC Clang https://reviews.llvm.org/D54026 ___ cfe-commits mailing list cfe-com

[PATCH] D53854: [Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia

2018-11-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: lib/Driver/ToolChains/Fuchsia.cpp:128 if (OnlyLibstdcxxStatic) - CmdArgs.push_back("-Bstatic"); + CmdArgs.push_back("-static"); ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); MaskRay w

[PATCH] D54064: [Driver] Always match resource dir in Fuchsia driver tests

2018-11-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D54064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D53854: [Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia

2018-11-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr reopened this revision. mcgrathr added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/ToolChains/Fuchsia.cpp:128 if (OnlyLibstdcxxStatic) - CmdArgs.push_back("-Bstatic"); + CmdArgs.push_back("-static");

[PATCH] D54082: [Driver] Use -Bstatic/dynamic for libc++ on Fuchsia

2018-11-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D54082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D54112: [Driver] Delete redundant -Bdynamic for libc++ on Fuchsia

2018-11-05 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr requested changes to this revision. mcgrathr added a comment. This revision now requires changes to proceed. This breaks the semantics we want. The `-Bdynamic` is there to apply to `-lm`, which is also what `--as-needed` is there for in this case (it appears earlier because of the cond

[PATCH] D54169: [clang-tidy] Zircon ->

2018-11-06 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D54169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D54463: [CMake] Support cross-compiling with Fuchsia toolchain build

2018-11-13 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D54463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D55405: [CMake] Use hidden visibility for static libc++ in Fuchsia

2018-12-10 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55405/new/ https://reviews.llvm.org/D55405 ___ cfe-commit

[PATCH] D60235: [CMake] Disable libc++ and libc++abi new/delete definitions when built with ASan

2019-04-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. IMHO the library code should use `#if !__has_feature(...)` to avoid the definitions entirely when built with a sanitizer whose runtime provides them. But this is a fine way to achieve that

[PATCH] D61040: [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions

2019-04-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1507 +Multilib::flags_list &Flags) { + if (Enabled) +Flags.push_back(std::str

[PATCH] D60990: [Driver] Support priority for multilibs

2019-04-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/include/clang/Driver/Multilib.h:81 + /// Returns the multilib priority. + int priority() const { return Priority; } Say explic

[PATCH] D61040: [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptions

2019-04-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:179 + .flag("+fno-exceptions"); + Multilib ASan = Multilib("/asan", "", "", 2).flag("+fsanitize=address"); + Multilibs.push_back(Default); Add a comment

[PATCH] D52402: [CMake][Fuchsia] Use internal_linkage rather than always_inline for libc++

2018-09-23 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm as long as we revert when the underlying bugs are resovled Repository: rC Clang https://reviews.llvm.org/D52402 ___ cfe-commits maili

[PATCH] D52660: [CMake][Fuchsia] Use libc++ ABIv2 for Fuchsia toolchain

2018-09-28 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D52660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-10-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. The motivating use case always pairs `noderef` with an `address_space` attribute, and it's already invalid to convert between pointer types in different address spaces without a cast. So I don't think we have a strong opinion one way or the other. In the abstract, I'd

[PATCH] D58010: [CodeGen] Set construction vtable visibility after creating initializer

2019-02-09 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm with a comment (and perhaps an assertion). Comment at: clang/lib/CodeGen/CGVTables.cpp:777 + CGM.setGVProperties(VTable, RD); + Give it a comment

[PATCH] D58325: [Driver][Fuchsia] Support -nolibc flag

2019-02-16 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. This is only on GCC trunk (i.e. 9), not in 8.2 or even the current gcc-8 branch. So clarify the log entry. We don't know if 8.x,x>2 will add it or only gcc 9. Repository: rC Clang C

[PATCH] D37723: [Driver] Fuchsia targets default to -fasynchronous-unwind-tables

2017-09-11 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. Herald added subscribers: kristof.beyls, aemerson. This regressed for x86-64 in r307856 because it's no longer inherited from Generic_GCC. We'd never noticed that it was missing other targets (i.e. aarch64), but Fuchsia is uniform across all machines. Repository:

[PATCH] D37785: [Fuchsia] Set ENABLE_X86_RELAX_RELOCATIONS for Fuchsia builds

2017-09-12 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. Herald added a subscriber: mgorny. This is a "Does your linker support it?" option, and all ours do. Repository: rL LLVM https://reviews.llvm.org/D37785 Files: cmake/caches/Fuchsia-stage2.cmake Index: cmake/caches/Fuchsia-stage2.cmake =

[PATCH] D62712: [CMake][Fuchsia] Use libc++ ABI v2 on Darwin as well

2019-05-30 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62712/new/ https://reviews.llvm.org/D62712 ___ cfe-commit

[PATCH] D64605: [CMake][Fuchsia] Use RelWithDebInfo to build runtimes

2019-07-11 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. Lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64605/new/ https://reviews.llvm.org/D64605 ___ cfe-commit

[PATCH] D64603: [Target] Use IEEE quad format for long double on Fuchsia x86_64

2019-07-17 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Basic/Targets/X86.h:858 + : FuchsiaTargetInfo(Triple, Opts) { +LongDoubleFormat = &llvm::APFloat::IEEEquad(); + } Can we just do this in FuchsiaTargetInfo generically? I think we'd like to make our c

[PATCH] D65715: [Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack

2019-08-04 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added reviewers: phosek, MaskRay. Herald added a project: clang. Herald added a subscriber: cfe-commits. These "sanitizers" are hardened ABIs that are wholly orthogonal to the SanitizerCoverage instrumentation. Repository: rG LLVM Github Monorepo https

[PATCH] D64140: [CMake][Fuchsia] Define asan+noexcept multilib

2019-07-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64140/new/ https://reviews.llvm.org/D64140 ___ cfe-commit

[PATCH] D62442: [Driver] Update handling of c++ and runtime directories

2019-05-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm contingent on verifying intended behavior changes and adding comments. The factoring suggestion for the triple,triple searching is preferred but at your discretion, though I'd really

[PATCH] D62469: [Driver] Change layout of per-target runtimes to resemble multiarch

2019-05-27 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr 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/D62469/new/ https://reviews.llvm.org/D62469 ___

[PATCH] D62558: [Driver] Search the toolchain dir with -print-file-name

2019-05-28 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62558/new/ https://reviews.llvm.org/D62558 ___ cfe-commit

[PATCH] D56348: [CMake][Fuchsia] Enable --build-id linker flag by default

2019-01-04 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56348/new/ https://reviews.llvm.org/D56348 ___ cfe-commit

[PATCH] D56350: [CMake][Fuchsia] Enable experimental new pass manager by default

2019-01-04 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56350/new/ https://reviews.llvm.org/D56350 ___ cfe-commit

[PATCH] D56349: [CMake][Fuchsia] Enable x86 relaxation by default

2019-01-04 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm. Wouldn't hurt to comment that this depends on a linker new enough to support the new reloc types (only reason it's conditional at all) and since we default to lld we don't worry abo

[PATCH] D56359: [CMake][Fuchsia] Enable build ID, relaxations for first stage

2019-01-05 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56359/new/ https://reviews.llvm.org/D56359 ___ cfe-commit

[PATCH] D46361: [CMake][Cache] Stop pretending that Fuchsia is UNIX

2018-05-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. fnu lgtm Repository: rC Clang https://reviews.llvm.org/D46361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D48563: [CMake] Use explicit targets for building Linux runtimes

2018-06-26 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D48563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D48564: [CMake] Support passing FUCHSIA_SDK as the only variable

2018-06-26 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D48564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D42019: [Driver] Set default sysroot for Fuchsia if none is specified

2018-07-14 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. Is this still live? Should it be different after all the multiarch stuff? Repository: rC Clang https://reviews.llvm.org/D42019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D66712: [Driver] Enable ShadowCallStack, not SafeStack, by default on AArch64 Fuchsia

2019-10-16 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. It's time to land this now. Can one of you commit it for me? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66712/new/ https://reviews.llvm.org/D66712 ___ cfe-commits mailing

[PATCH] D66712: [Driver] Enable ShadowCallStack, not SafeStack, by default on AArch64 Fuchsia

2019-10-16 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 225273. mcgrathr added a comment. rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66712/new/ https://reviews.llvm.org/D66712 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp clang/test/Driver/fuchsia.

[PATCH] D79835: [Fuchsia] Rely on linker switch rather than dead code ref for profile runtime

2020-05-29 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 267336. mcgrathr added a comment. comment update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79835/new/ https://reviews.llvm.org/D79835 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp clang/lib/Driver/To

[PATCH] D84482: [Fuchsia] Use -z dead-reloc-in-nonalloc=*=0 for Fuchsia targets

2020-07-23 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added reviewers: phosek, leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D84482 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp Index: clang/lib/Driver/T

[PATCH] D78687: [Fuchsia] Build compiler-rt builtins for 32-bit x86

2020-04-22 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr 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/D78687/new/ https://reviews.llvm.org/D78687 ___

[PATCH] D85362: [CMake] Print the autodetected host linker version

2020-08-05 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. That's a great start. IMHO we should give the driver a way to print out its embedded value too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use

2020-08-12 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/include/clang/Basic/TargetCXXABI.h:39 + static const auto &getABIMap() { +static llvm::StringMap ABIMap = { The option UI should use lowercase values by default, or else just do case-insensitive matching.

[PATCH] D85924: [clang] Add __RELATIVE_CXX_ABI_VTABLES predefine macro

2020-08-13 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:1127 + if (LangOpts.RelativeCXXABIVTables) +Builder.defineMacro("__RELATIVE_CXX_ABI_VTABLES"); This should also test `LangOpts.CplusPlus` so it's never defined in C compil

[PATCH] D85924: [clang] Add __RELATIVE_CXX_ABI_VTABLES predefine macro

2020-08-13 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:1127 + if (LangOpts.RelativeCXXABIVTables) +Builder.defineMacro("__RELATIVE_CXX_ABI_VTABLES"); ldionne wrote: > mcgrathr wrote: > > This should also test `LangOpts.CplusPlu

[PATCH] D85924: [clang][feature] Add cxx_abi_relative_vtable feature

2020-08-14 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. LGTM but I'm not sure who should sign off on new `__has_feature` symbols. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85924/new/ https://r

[PATCH] D79665: [Clang] Pass --pack-dyn-relocs=relr to lld for Fuchsia

2020-05-09 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added a reviewer: phosek. Herald added a project: clang. Herald added a subscriber: cfe-commits. The compact format is fully supported on Fuchsia and is the preferred default. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D79665 Files:

[PATCH] D79667: [Clang] Pass -z max-page-size to linker for Fuchsia

2020-05-09 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added a reviewer: phosek. Herald added a project: clang. Herald added a subscriber: cfe-commits. mcgrathr added a parent revision: D79665: [Clang] Pass --pack-dyn-relocs=relr to lld for Fuchsia. Currently all Fuchsia ABIs use a 4k page size, departing from

[PATCH] D79835: [Fuchsia] Rely on linker switch rather than dead code ref for profile runtime

2020-05-12 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added a reviewer: phosek. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. Follow the model used on Linux, where the clang driver passes the linker a `-u` switch to force the profile runtime to be linked in

[PATCH] D40329: [CMake][Fuchsia] Disable terminfo database in Fuchsia toolchain

2017-11-27 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D40329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D122613: [Driver] Make -moutline-atomics default for aarch64-fuchsia targets

2022-03-28 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added reviewers: phosek, abrachet. Herald added a subscriber: kristof.beyls. Herald added a project: All. mcgrathr requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. This makes Fuchsia consisten

[PATCH] D122613: [Driver] Make -moutline-atomics default for aarch64-fuchsia targets

2022-03-28 Thread Roland McGrath 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 rG1a963d3278c2: [Driver] Make -moutline-atomics default for aarch64-fuchsia targets (authored by mcgrathr). Repository: rG LLVM Github Monorepo CHA

[PATCH] D119201: [clang][Fuchsia] Ensure static sanitizer libs are only linked in after the -nostdlib check

2022-02-07 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:130 - bool NeedsSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs); bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs); AddLinkerInputs(ToolChain, Inputs, Args, Cmd

[PATCH] D119201: [clang][Fuchsia] Ensure static sanitizer libs are only linked in after the -nostdlib check

2022-02-07 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:157 if (NeedsSanitizerDeps) linkSanitizerRuntimeDeps(ToolChain, CmdArgs); This function is a no-op because it tests for fuchsia targets. So it probably makes more

[PATCH] D129512: [Driver] Don't use frame pointer on Fuchsia when optimizations are enabled

2022-07-11 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm but be sure that Fuchsia target users get clear release-notes warning about the change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D66712: [Driver] Enable ShadowCallStack, not SafeStack, by default on AArch64 Fuchsia

2019-08-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. Herald added subscribers: cfe-commits, cryptoad, kristof.beyls, javed.absar. Herald added a project: clang. On AArch64, Fuchsia fully supports both SafeStack and ShadowCallStack ABIs. The latter is now preferred and will be the default. It's possible to enable both

[PATCH] D66712: [Driver] Enable ShadowCallStack, not SafeStack, by default on AArch64 Fuchsia

2019-08-24 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added reviewers: phosek, leonardchan, jakehehrlich. mcgrathr added a comment. This should land only after we've done our first stages of downstream roll-out and burn-in testing. But setting it up now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D35922: [Driver] Enable AddressSanitizer for Fuchsia targets

2017-08-01 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: cmake/caches/Fuchsia-stage2.cmake:50 set(RUNTIMES_${target}-fuchsia_LIBCXX_ABI_VERSION 2 CACHE STRING "") + set(RUNTIMES_${target}-fuchsia_SANITIZER_USE_COMPILER_RT ON CACHE BOOL "") endforeach() phosek wrote: > I

[PATCH] D36202: [Driver] Disable static C++ library support on Fuchsia

2017-08-01 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. LGTM. The nit below is orthogonal to this change. Comment at: lib/Driver/ToolChains/Fuchsia.cpp:112 ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); -if (O

[PATCH] D35922: [Driver] Enable AddressSanitizer for Fuchsia targets

2017-08-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 109428. mcgrathr added a comment. Added tests. https://reviews.llvm.org/D35922 Files: cmake/caches/Fuchsia-stage2.cmake lib/Driver/SanitizerArgs.cpp lib/Driver/ToolChains/Fuchsia.cpp test/Driver/fuchsia.c Index: test/Driver/fuchsia.c =

[PATCH] D36254: [Driver][Fuchsia] Pass --hash-style=gnu to the linker

2017-08-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. The .gnu_hash format is superior, and all versions of the Fuchsia dynamic linker support it. Repository: rL LLVM https://reviews.llvm.org/D36254 Files: lib/Driver/ToolChains/Fuchsia.cpp Index: lib/Driver/ToolChains/Fuchsia.cpp =

[PATCH] D36254: [Driver][Fuchsia] Pass --hash-style=gnu to the linker

2017-08-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 109603. mcgrathr added a comment. Added test. https://reviews.llvm.org/D36254 Files: lib/Driver/ToolChains/Fuchsia.cpp test/Driver/fuchsia.c Index: test/Driver/fuchsia.c === --- test/Dri

[PATCH] D35922: [Driver] Enable AddressSanitizer for Fuchsia targets

2017-08-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 109605. mcgrathr added a comment. Check -dynamic-linker in test. https://reviews.llvm.org/D35922 Files: cmake/caches/Fuchsia-stage2.cmake lib/Driver/SanitizerArgs.cpp lib/Driver/ToolChains/Fuchsia.cpp test/Driver/fuchsia.c Index: test/Driver/fuchs

[PATCH] D36349: [CMake] Build sanitized C++ runtimes for Fuchsia

2017-08-06 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: cmake/caches/Fuchsia-stage2.cmake:56 +foreach(target x86_64;aarch64) + set(RUNTIMES_${target}-fuchsia-asan_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "") Can you do this without duplicating all the identical setti

[PATCH] D36779: [Driver] SafeStack does not need a runtime library on Fuchsia

2017-08-15 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added a project: Sanitizers. Repository: rL LLVM https://reviews.llvm.org/D36779 Files: include/clang/Driver/SanitizerArgs.h lib/Driver/SanitizerArgs.cpp test/Driver/fuchsia.c Index: test/Driver/fuchsia.c

[PATCH] D86822: [clang] Enable -fsanitize=thread on Fuchsia.

2020-08-28 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. I'm not 100% sure we don't need more fiddles in the driver, but we can iterate from here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86822/new/ https://reviews.llvm.org/D86822

[PATCH] D90275: [clang][IR] Add support for leaf attribute

2020-11-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. The GCC documentation specifically gives the example of the standard C function `qsort` as one that does not qualify as `__attribute__((leaf))` because it uses a callback function (that presumably might be from the caller's own TU). AIUI the claim the attribute makes

[PATCH] D91226: [clang] Add missing header guard in

2020-11-10 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added reviewers: phosek, leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. mcgrathr requested review of this revision. This header has long lacked a standard multiple inclusion guard like other headers have, for no apparent

[PATCH] D91226: [clang] Add missing header guard in

2020-11-10 Thread Roland McGrath 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 rGcf36142d342a: [clang] Add missing header guard in (authored by mcgrathr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D91387: [Driver] Support UBSan multilib

2020-11-13 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:214-215 + set(RUNTIMES_${target}-unknown-fuchsia+ubsan+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "") +set(RUNTIMES_${target}-unknown-fuchsia+ubsan+noexcept_LLVM_USE_SANITIZER "Und

[PATCH] D92444: [CMake][Fuchsia] Install llvm-elfabi

2020-12-01 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr created this revision. mcgrathr added reviewers: leonardchan, haowei. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. mcgrathr requested review of this revision. The canonical Fuchsia toolchain configuration installs llvm-elfabi. Repository: rG LLVM Githu

[PATCH] D92444: [CMake][Fuchsia] Install llvm-elfabi

2020-12-02 Thread Roland McGrath via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG70764c02e474: [CMake][Fuchsia] Install llvm-elfabi (authored by mcgrathr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92444/new/ https://reviews.llvm.org

[PATCH] D90275: [clang][IR] Add support for leaf attribute

2020-10-27 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. There is an RFC going out with this prototype as reference. When there is consensus on the RFC, this will get in shape for landing with complete tests and all. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90275/new/ ht

[PATCH] D103544: [compiler-rt][Fuchsia] Disable interceptors while enabling new/delete replacements

2021-06-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added inline comments. Comment at: compiler-rt/lib/hwasan/CMakeLists.txt:45 +if (NOT FUCHSIA) + append_list_if(COMPILER_RT_HWASAN_WITH_INTERCEPTORS HWASAN_WITH_INTERCEPTORS=1 HWASAN_DEFINITIONS) +else() It might be better to force the value of COMPILER

[PATCH] D103543: [compiler-rt][Fuchsia] Support HWASan on Fuchsia

2021-06-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. I think this may need to be about the last thing to actually land. It shouldn't land before building the runtime reliably works without error, and I think we should land any refactoring o

[PATCH] D103555: [Fuchsia] Use libc++abi on Windows in Fuchsia toolchain

2021-06-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103555/new/ https://reviews.llvm.org/D103555 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D103564: [NFC][compiler-rt][hwasan] Wrap vfork interceptor with HWASAN_WITH_INTERCEPTORS

2021-06-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. I think probably the better refactoring here would be to split this file in two: one containing just the allocation functions; and a second with everything else. On Fuchsia, we'll use the allocation functions but none of the rest of it. So the second whole file could

[PATCH] D93668: [clang] Override the Fuchsia platform ABI using the triple environment

2021-01-21 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. I am also a C++ programmer working on C++ ABI support. I'm glad to be working on a platform that made many intentional design decisions to enable keeping the C++ ABI out of the platform ABI. It makes it vastly easier to do interesting work on C++ ABIs such as what Le

[PATCH] D103564: [NFC][compiler-rt][hwasan] Wrap fork interceptor with HWASAN_WITH_INTERCEPTORS

2021-06-03 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr added a comment. In D103564#2797657 , @leonardchan wrote: > I don't think we can move the `__sanitizer_*` allocation functions since > they're used for aliases for their libc equivalents which require definitions > in the same TU: What I sugg

  1   2   >