[PATCH] D46300: [Clang] Implement function attribute no_stack_protector.

2018-05-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 145988. manojgupta added a comment. Updated test case for error msg with arguments. Updated the documentation. Repository: rC Clang https://reviews.llvm.org/D46300 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/Co

[PATCH] D46300: [Clang] Implement function attribute no_stack_protector.

2018-05-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Thanks! Repository: rC Clang https://reviews.llvm.org/D46300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46300: [Clang] Implement function attribute no_stack_protector.

2018-05-09 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331925: [Clang] Implement function attribute no_stack_protector. (authored by manojgupta, committed by ). Changed prior to commit: https://reviews.llvm.org/D46300?vs=145988&id=146008#toc Repository:

[PATCH] D51440: [ToolChains] Link to compiler-rt with -L + -l when possible

2018-08-29 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Just a minor comment regarding test cases: Since you are adding both -L/path/ and -l, the test cases should be updated to check for the -L/path/ argument as well. Repository: rC Clang https://reviews.llvm.org/D51440 __

[PATCH] D51440: [ToolChains] Link to compiler-rt with -L + -l when possible

2018-08-29 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In https://reviews.llvm.org/D51440#1217910, @mstorsjo wrote: > In https://reviews.llvm.org/D51440#1217839, @manojgupta wrote: > > > Just a minor comment regarding test cases: Since you are adding both > > -L/path/ and -l, the test cases should be updated to check fo

[PATCH] D51713: Support -fno-omit-frame-pointer with -pg.

2018-09-12 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. What is the call generated with -pg for AMR32, __gnu_mcount_nc or _mount? __gnu_mcount_nc with "-pg" is known to be broken ( https://bugs.llvm.org/show_bug.cgi?id=33845) Repository: rC Clang https://reviews.llvm.org/D51713

[PATCH] D51713: Support -fno-omit-frame-pointer with -pg.

2018-09-12 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In https://reviews.llvm.org/D51713#1232497, @srhines wrote: > In https://reviews.llvm.org/D51713#1232414, @manojgupta wrote: > > > What is the call generated with -pg for AMR32, __gnu_mcount_nc or _mount? > > __gnu_mcount_nc with "-pg" is known to be broken ( > > ht

[PATCH] D34357: [Clang] Handle interaction of -pg and no_instrument_function attribute.

2017-06-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. Disable generation of counting-function attribute if no_instrument_function attribute is present in function. Interaction between -pg and no_instrument_function is the desired behavior and matches gcc as well. This is required for fixing a crash in Linux kernel wh

[PATCH] D34357: [Clang] Handle interaction of -pg and no_instrument_function attribute.

2017-06-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Thanks for the quick review. https://reviews.llvm.org/D34357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34426: [Driver] Do not increment ActionCount for precompiled headers.

2017-06-20 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. If a .h file is specifed as input, it gets compiled to a PCH file. Handle the PCH Action and do not throw the error: "cannot specify -o when generating multiple output files" This fixes PR33533. https://reviews.llvm.org/D34426 Files: lib/Driver/Driver.cpp

[PATCH] D34426: [Driver] Do not increment ActionCount for precompiled headers.

2017-06-20 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 103280. https://reviews.llvm.org/D34426 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp === --- lib/Driver/Driver.cpp +++ lib/Driver/Driver.cpp @@ -2759,7 +2759,7 @@ if (Final

[PATCH] D34426: [Driver] Do not increment ActionCount for precompiled headers.

2017-06-20 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. I am not sure what is the expected behavior. Maybe clang is doing the right thing in rejecting. But, this creates an issue in ChromeOS land where a package fails to build with clang (https://bugs.chromium.org/p/chromium/issues/detail?id=735206). https://reviews.llv

[PATCH] D43995: Do not generate calls to fentry with __attribute__((no_instrument_function))

2018-03-01 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: hfinkel, rengolin, srhines, chandlerc. Currently only calls to mcount were suppressed with no_instrument_function attribute. Linux kernel requires that calls to fentry should also not be generated. This is an extended fix for PR PR33515

[PATCH] D43995: Do not generate calls to fentry with __attribute__((no_instrument_function))

2018-03-02 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326639: Do not generate calls to fentry with __attribute__((no_instrument_function)) (authored by manojgupta, committed by ). Changed prior to commit: https://reviews.llvm.org/D43995?vs=136670&id=136874

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-06-07 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: t.p.northover, efriedma, jyknight, chandlerc, rnk, srhines, void. Support for this option is needed for building Linux kernel. This is a very frequently requested feature by kernel developers. More details : https://lkml.org/lkml/2018

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-06-07 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In https://reviews.llvm.org/D47894#1125406, @efriedma wrote: > Does IR generation need any special handling for this? We add nonnull > attributes in various places. My interpretation is adding nonnull attributes is fine as long is it is not derived from a pointer

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: efriedma, joerg. Herald added subscribers: Sanitizers, llvm-commits, delcypher, mgorny. float128 builtins are currently not built for x86_64. This causes linker to complain baout missing symbols when linking glibc 2.27 with float128 sup

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: lib/builtins/fp_lib.h:107 +// __LDBL_MANT_DIG__ is set to 64 for x86_64. +#if __LDBL_MANT_DIG__ == 113 || defined(__x86_64__) #define CRT_LDBL_128BIT I really don't know the accurate set of checks that should be use

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 170756. manojgupta added a comment. Added checked for defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__) Repository: rCRT Compiler Runtime https://reviews.llvm.org/D53608 Files: lib/builtins/CMakeLists.txt lib/builtins/fp_lib.h Index: lib/bui

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: lib/builtins/fp_lib.h:111 typedef __int128_t srep_t; -typedef long double fp_t; +typedef __float128 fp_t; #define REP_C (__uint128_t) efriedma wrote: > manojgupta wrote: > > Changed long double to __float128 on Eli

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-23 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. I am also getting these tests failures because of missing __trunctfxf2 and __extendxftf2. These are provided by libgcc but compiler-rt does not seem to have an implementation for them. Builtins-x86_64-linux :: compiler_rt_logbl_test.c Builtins-x86_64-linux :: div

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2018-10-24 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Took another look and seems like long double is hardcoded in many of the builtins. So I think the current patch needs to rename a lot of places using long double to __float128 type. Some examples where I think __float128 type (propagating the type in fp_lib.h) shoul

[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

2019-03-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D53608#1423692 , @LuoYuanke wrote: > Hi > What's the status for __float128 support? Has it already been finished? Sorry, haven't looked at time for a while. Consider this change abandoned for now :( Repository: rCRT C

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-13 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added subscribers: manojgupta, llozano. manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:447 const char *crtbegin; - if (Args.hasArg(options::OPT_static)) -crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o";

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-03-13 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:447 const char *crtbegin; - if (Args.hasArg(options::OPT_static)) -crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o"; - else if (Args.hasArg(options::OPT_shared)) -

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/include/clang/Driver/Options.td:2218 Group; -def mpower8_crypto : Flag<["-"], "mcrypto">, -Group; -def mnopower8_crypto : Flag<["-"], "mno-crypto">, -Group; +def mcrypto : Flag<["-"], "mcrypto">, Group, +HelpTex

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. The motivation for this change is to make "crypto" setting an additive option e.g. like "-mavx" used in many media packages. Some packages in Chrome want to enable crypto conditionally for a few files to allow crypto feature to be used based on runtime cpu detection

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D60472#1461351 , @peter.smith wrote: > > Is that not a limitation of the build system? I'd expect a package to be able > to locally override a global default rather than vice-versa. Although crypto > might be the area o

[PATCH] D60472: [AArch64][PowerPC][Driver] Allow setting crypto feature through -mcrypto for ARM/AArch64

2019-04-10 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D60472#1461351 , @peter.smith wrote: > > Is that not a limitation of the build system? I'd expect a package to be able > to locally override a global default rather than vice-versa. Although crypto > might be the area o

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. As per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80868, I thought GCC also emits this error but only with -pedantic. So probably should keep this error but under -Wextra or another appropriate group? Repository: rC Clang https://reviews.llvm.org/D52248

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-09-20 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. lgtm. But someone more familiar with these code paths should approve. Repository: rC Clang https://reviews.llvm.org/D52248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-07-15 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @dankm are you still working on this patch? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D48680: Add missing visibility annotation for __base

2019-07-16 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @pcc can you please submit this patch if there are no objections? Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48680/new/ https://reviews.llvm.org/D48680 ___ cfe-commits mailing list c

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D52524#1621468 , @thakis wrote: > Couldn't cross build users just pass -nostdsysteminc to tell clang to not > look in system header locations? My understanding is "-nostdsysteminc " does not block users from passing inclu

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In D52524#1630767 , @thakis wrote: > Wouldn't those projects just move to also disabling the warning by passing > -Wno-poison-system-directories? If there are projects that are actively > adding -I/usr/include, that means they

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-14 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/include/clang/Basic/DiagnosticGroups.td:1071 +// cross-compiling. +def PoisonSystemDirectories : DiagGroup<"poison-system-directories">; + Please verify that the warning is not enabled by default. CHANGES SINC

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/test/Frontend/warning-poison-system-directories.c:12 +// Missing target but included sysroot still causes the warning. +// RUN: %clang -Wpoison-system-directories -I/usr/include --sysroot %S/Inputs/sysroot_x86_64_cross_linux_tr

[PATCH] D52524: Add -Wno-poison-system-directories flag

2019-08-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added reviewers: rtrieu, aaron.ballman. manojgupta added a comment. Thanks, Adding a few more reviewers since I am not very familiar with this part of clang. Please also update the patch description as suggested by @thakis CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/

[PATCH] D48680: Add missing visibility annotation for __base

2019-06-24 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @ldionne Does Peter's example answer your questions? Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48680/new/ https://reviews.llvm.org/D48680 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D48680: Add missing visibility annotation for __base

2019-05-28 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Herald added a subscriber: libcxx-commits. Hi Peter and Marshall, Yunlian has moved to a different project. Can you let me know what is missing in this patch so that it can be submitted. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D52524: Add -Wpoison-system-directories warning

2019-09-12 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta closed this revision. manojgupta added a comment. Submitted as https://reviews.llvm.org/rL371785. Thanks for the patch! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52524/new/ https://reviews.llvm.org/D52524 ___ cfe-commits mail

[PATCH] D46300: [Clang] Implement function attribute no_stack_protector.

2018-04-30 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: aaron.ballman, rsmith, rnk, void. This attribute tells clang to skip this function from stack protector when -stack-protector option is passed. GCC option for this is: __attribute__((__optimize__("no-stack-protector"))) and the equivale

[PATCH] D46300: [Clang] Implement function attribute no_stack_protector.

2018-05-07 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 145514. manojgupta added a comment. Added docs, Sema test case for the attribute. Repository: rC Clang https://reviews.llvm.org/D46300 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CodeGenModule.cpp lib/Sema/Se

[PATCH] D46300: [Clang] Implement function attribute no_stack_protector.

2018-05-07 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: include/clang/Basic/Attr.td:1494 +def NoStackProtector : InheritableAttr { + let Spellings = [GCC<"no_stack_protector">]; + let Subjects = SubjectList<[Function]>; aaron.ballman wrote: > This is not a GCC attribute,

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-10 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 154895. manojgupta added a comment. Do not generate calls with "nonnull" attribute with "-fno-delete-null-pointer-checks". The warnings are still generated when nullptr is passed to a function with nonnull attribute. Repository: rC Clang https://revi

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-11 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @efriedma @jyknight Does the change match your expectations where warnings are still generated but codeGen does not emit nonnull attribute? Comment at: test/Sema/nonnull.c:2 // RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-o

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-13 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Ping! Repository: rC Clang https://reviews.llvm.org/D47894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-17 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 155891. manojgupta added a comment. Added helper text, updated tests. Repository: rC Clang https://reviews.llvm.org/D47894 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-18 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337433: [clang]: Add support for "-fno-delete-null-pointer-checks" (authored by manojgupta, committed by ). Changed prior to commit: https://reviews.llvm.org/D47894?vs=155891&id=156195#toc Repository:

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2020-04-07 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. I opened https://github.com/ClangBuiltLinux/linux/issues/979 to see if we can fix this in Linux kernel. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71082/new/ https://reviews.llvm.org/D71082 ___

[PATCH] D78862: [IR] Convert null-pointer-is-valid into an enum attribute

2020-04-28 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @nikic Thanks for the work. In D78862#2003684 , @arsenm wrote: > FWIW I think this attribute should be replaced with a data layout property, > so this would eventually be removed @arsenm Is there any work planned on moving

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: MaskRay, abidh, kristof.beyls. Herald added subscribers: luke957, StephenFan, s.egerton, simoncook, ki.stfu. Herald added a project: All. manojgupta requested review of this revision. Herald added subscribers: cfe-commits, pcwang-thead.

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/include/clang/Driver/ToolChain.h:384 + /// IsBareMetal - Does this tool chain is a baremetal target. + static bool IsBareMetal(const llvm::Triple &); barannikov88 wrote: > Is this a correct sentence? (My Eng

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 450894. manojgupta added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Moved Baremetal triple related code to Triple.h. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/include/clang/Driver/ToolChain.h:388 + /// IsRISCVBareMetal - Does this tool chain is a riscv baremetal target. + static bool IsRISCVBareMetal(const llvm::Triple &); + barannikov88 wrote: > barannikov88 wrote:

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 450898. manojgupta added a comment. Herald added a subscriber: hiraditya. Moved defs to Triple.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225 Files: clang/l

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 450908. manojgupta added a comment. Address style nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225 Files: clang/lib/Driver/Driver.cpp clang/lib/Driver/Too

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 450910. manojgupta added a comment. Address more style lints. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225 Files: clang/lib/Driver/Driver.cpp clang/lib/Driv

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:228-237 + case ToolChain::RLT_CompilerRT: { +const std::string fileName = getCompilerRT(Args, "builtins"); +std::string baseName = llvm::sys::path::filename(fileName).str(); +llvm

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 451222. manojgupta added a comment. Address maskray comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225 Files: clang/lib/Driver/Driver.cpp clang/lib/Driv

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 451325. manojgupta added a comment. Fix clang-format complains. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225 Files: clang/lib/Driver/Driver.cpp clang/lib/Dr

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 451352. manojgupta added a comment. Going back to older handlesTarget() style in Baremetal. Apparently RISCV can be both Baremetal or RISCVToolchain for the same tuple. I do not know of the nuances so trying not to disturb that for now. Repository: rG L

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-10 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG06fc5a771462: Driver: Refactor and support per target dirs in baremetal (authored by manojgupta). Changed prior to commit: https://reviews.llvm.org/D131225?vs=451352&id=451517#toc Repository: rG LLVM

[PATCH] D121328: Disable -Wmissing-prototypes for internal linkage functions that aren't explicitly marked "static"""

2022-03-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. For the background, we had hit this in Chrome OS when building bluetooth code. This is the one of structs hitting the issue where the warning got promoted to an error: typedef struct { private: static std::string AppendCapability(std::string& result, bool append,

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-14 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. We noticed a new crash that still repros at head. clang -target armv7a-linux-gnueabihf -march=armv8a -mthumb -c -O2 file.cc llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:10135: llvm::Value *llvm::VPTransformState::get(llvm::VPValue *, unsigned int): As

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-28 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Some of our users are not very happy with the churn probably caused by this change where the declaration has the "void" argument but the later definition does not have explicit "void". void foo(void); void foo() { } GCC does not warn about this usage: h

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-29 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Is disabling the pedantic warning an option for your users? Disabling it wholesale is not an option since they actually want this warning (the older version). But we agreed to disable it specifically for the code where the warning was getting fired. One instance i

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-29 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Basically, I'm wondering if you'd be able to enable -fno-knr-function? Thanks. this looks promising. Any ideas when -fno-knr-function support was added? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ http

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-29 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Unless I probably mis-interpreted something, -fno-knr-functions does not suppress the warning: https://godbolt.org/z/rbEfbbb33 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ https://reviews.llvm.org/D122895

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-30 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. We are finding a lot of failures in our ToT builds with this change. here is an example for a configure script: $ cat tent.c int main () { tgetent(0,0); return 0; } $ bin/clang -c tent.c -Wno-error tent.c:3:2: error: call to undeclared function 'tgetent'; ISO C99 a

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-30 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Tried locally but I still see the warning with -fno-knr-functions. It also says that the argument is unused. bin/clang --version clang version 15.0.0 (https://github.com/llvm/llvm-project.git a9d68a5524dea113cace5983697786599cbdce9a

[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C

2022-04-30 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Following behavior is also surprising: Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122895/new/ https://reviews.llvm.org/D122895 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-30 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Hmm, the commit message says that Wno-error should work but this is not really the case :(. > (they can disable the warning or use -Wno-error to downgrade the > error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122983

[PATCH] D87901: [Driver] Filter out /gcc and /gcc-cross if they do not exists

2020-09-26 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1949 + // Maybe filter out /gcc and /gcc-cross. + GCCDirExists = D.getVFS().exists(LibDir + "/gcc"); + GCCCrossDirExists = D.getVFS().exists(LibDir + "/gcc-cross"); S

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a reviewer: mgorny. manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2537-2538 const SmallVectorImpl &CandidateBiarchTriples) { + if (!D.getVFS().exists(GentooConfigDir)) +return false; + I think it shou

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta accepted this revision. manojgupta added a comment. This revision is now accepted and ready to land. Looks ok to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87143/new/ https://reviews.llvm.org/D87143 __

[PATCH] D89327: fixes compiler-rt bug when printing libgcc for baremetal

2020-10-14 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG18432bea7648: [Driver]: fix compiler-rt path when printing libgcc for baremetal (authored by cjdb, committed by manojgupta). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed

[PATCH] D92176: Don't use sysroot/include when sysroot is empty.

2020-11-26 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. lgtm but not an expert in this area. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92176/new/ https://reviews.llvm.org/D92176 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D52524: Add -Wpoison-system-directories warning

2021-05-20 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. An earlier version did check for library directories [1]. I am not exactly sure why was it removed, maybe it didn't work. So if anyone is willing to test that, please apply the diff and try. [1] Diff https://reviews.llvm.org/D52524?id=215958 CHANGES SINCE LAST ACTI

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-08-09 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Please also see https://bugs.llvm.org/show_bug.cgi?id=51416 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99517/new/ https://reviews.llvm.org/D99517 ___ cfe-commits mailing li

[PATCH] D112091: libfuzzer: All building libfuzzer for ARM32

2021-10-28 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @kcc do you have any concerns? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112091/new/ https://reviews.llvm.org/D112091 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D97894: [Driver] Drop $sysroot/usr special case from Gentoo gcc-config detection

2021-03-03 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Thanks @MaskRay for this clean up. I can't speak for all of Gentoo but please give me a couple of days to at least test this on Chrome OS. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97894/new/ https://reviews.llvm.or

[PATCH] D97894: [Driver] Drop $sysroot/usr special case from Gentoo gcc-config detection

2021-03-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. In Chrome OS, we currently both "-B" and "--prefix". "-B" points to binutils bin directory and the "--prefix" has the binutils directory + target suffix. Should we drop "-B" and still get the same behavior? Sample invocation: '/usr/bin/clang++' '--sysroot=/usr/x86_64

[PATCH] D97894: [Driver] Drop $sysroot/usr special case from Gentoo gcc-config detection

2021-03-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. > With the special rule, it is: if --gcc-toolchain is $sysroot/usr, suppress > sysroot GCC detection as well. > > Clang -B and --gcc-toolchain have some weird behaviors. Hope you can share > your opinions on > https://lists.llvm.org/pipermail/cfe-dev/2021-March/06782

[PATCH] D97993: [Driver] Suppress GCC detection under -B for non-Android

2021-03-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. I am not sure of the rationale or upside of this change and why do we want to drop gcc detection? GCC does not need to do the GCC detection because it has the needed information at configure time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D97902: [Driver] Clarify --gcc-toolchain

2021-03-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. thanks, this is much needed documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97902/new/ https://reviews.llvm.org/D97902 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D97993: [Driver] Suppress GCC detection under -B for non-Android

2021-03-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Thanks for explaining that it only affects "-B". While I believe that this change won't affect us in Chrome OS, I think it should be reviewed and approved by a few Linux distro contributors since there is already known reliance e.g. Android on the current behavior.

[PATCH] D97993: [Driver] Suppress GCC detection under -B for non-Android

2021-03-05 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Another concern is people generally want clang to work out of box without any special arguments. As a user, after installing clang's distro package or building from source, I expect that basic compilation should work out-of-box which includes gcc detection. i.e. "cl

[PATCH] D97993: [Driver] Suppress GCC detection under -B for non-Android

2021-03-05 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a subscriber: tstellar. manojgupta added a comment. Thanks for the clarification. I do not have any objections but I feel that am not the right person to approve this change. @tstellar can you please review it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D97894: [Driver] Drop $sysroot/usr special case from Gentoo gcc-config detection

2021-03-11 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta accepted this revision. manojgupta added a comment. @MaskRay I have verified that Chrome OS builds are not affected by this change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97894/new/ https://reviews.llvm.org/D97894 ___

[PATCH] D113779: [Clang] Add mfp16, mfp16fml and mdotprod flags for ARM target features.

2021-11-15 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Yes, the current approach of "-march=+feature" is terrible and does not work with developers who want flexibility of features. This being pitched as a feature imo is akin to promoting a design bug as a feature. Any additive or subtractive alternative is welcome. Re

[PATCH] D112091: libfuzzer: All building libfuzzer for ARM32

2021-11-17 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a reviewer: morehouse. manojgupta added a comment. Matt, do you think you can review this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112091/new/ https://reviews.llvm.org/D112091 ___

[PATCH] D112091: libfuzzer: All building libfuzzer for ARM32

2021-11-18 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2782cb8da0b3: libfuzzer: All building libfuzzer for ARM32 (authored by manojgupta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112091/new/ https://review

[PATCH] D113779: [Clang] Add mfp16, mfp16fml and mdotprod flags for ARM target features.

2021-11-18 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. > More subjective: for most users this whole -march business is abstracted away > in build systems, so they won't have to deal with this, that's why this isn't > so much of an improvement. > If we want a better user experience set options, there are probably other

[PATCH] D114312: libfuzzer: Disable broken tests for arm

2021-11-19 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: morehouse, metzman. Herald added a subscriber: kristof.beyls. manojgupta requested review of this revision. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. libfuzzer was recently enabled for Arm32 in D112091

[PATCH] D114312: libfuzzer: Disable broken tests for arm

2021-11-22 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2e67276d984d: libfuzzer: Disable broken tests for arm (authored by manojgupta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114312/new/ https://reviews.ll

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-10-25 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta created this revision. manojgupta added reviewers: abidh, tomhughes. Herald added subscribers: kristof.beyls, ki.stfu, dschuff. Herald added a project: All. manojgupta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This matches

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-10-25 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 470611. manojgupta added a comment. Removed c++ limitation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/ https://reviews.llvm.org/D136712 Files: clang/lib/Basic/Targets/ARM.cpp clang/test/D

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-10-28 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added reviewers: MaskRay, efriedma. manojgupta added subscribers: MaskRay, efriedma. manojgupta added a comment. Herald added a subscriber: StephenFan. I am not sure who is a good reviewer for this. Starting with @MaskRay and @efriedma Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-10-28 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. @tomhughes has more details on this but if we do not define it in clang itself, we'll need to define it for every package manually at build time since the usage goes deep inside newlib headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

  1   2   >