Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

raj.khem (Khem Raj)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 10 2015, 3:44 PM (429 w, 3 h)

Recent Activity

Aug 25 2023

raj.khem added a comment to D158375: [llvm-exegesis] Use mmap2 when mmap is unavailable to fix riscv32 build.

Given how late we are in the release process, I'll go ahead, apply the changes, and land this patch.
I've landed other fixes for @raj.khem and hope that he doesn't mind:)

Aug 25 2023, 10:53 AM · Restricted Project, Restricted Project
raj.khem updated the diff for D158375: [llvm-exegesis] Use mmap2 when mmap is unavailable to fix riscv32 build.
Aug 25 2023, 10:43 AM · Restricted Project, Restricted Project

Aug 24 2023

raj.khem added a reviewer for D158375: [llvm-exegesis] Use mmap2 when mmap is unavailable to fix riscv32 build: MaskRay.
Aug 24 2023, 11:10 PM · Restricted Project, Restricted Project

Aug 20 2023

raj.khem added a comment to D158375: [llvm-exegesis] Use mmap2 when mmap is unavailable to fix riscv32 build.

This is also needed on 17.0.0 branch too.

Aug 20 2023, 1:58 PM · Restricted Project, Restricted Project
raj.khem requested review of D158375: [llvm-exegesis] Use mmap2 when mmap is unavailable to fix riscv32 build.
Aug 20 2023, 1:57 PM · Restricted Project, Restricted Project

Jul 31 2023

raj.khem added a comment to D142880: [RISCV][LLD] Support R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128.

@raj.khem ooops, thanks for report that, I am happy to debug that, so...it would be appreciate if you can provide files by -Wl,--reproduce=xx.tar :)

Jul 31 2023, 11:27 AM · Restricted Project, Restricted Project

Jul 26 2023

raj.khem added a comment to D142880: [RISCV][LLD] Support R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128.

Just cross-linking to https://github.com/llvm/llvm-project/issues/64102 - as we discussed at the last RISC-V LLVM sync-up we really would like to land this and get it into the LLVM 17 branch if possible, to avoid compatibility issues with the next binutils release.

For cross reference. this review https://reviews.llvm.org/D142879 also needs to land together with this.

Jul 26 2023, 9:49 PM · Restricted Project, Restricted Project
raj.khem added a comment to D142880: [RISCV][LLD] Support R_RISCV_SET_ULEB128 and R_RISCV_SUB_ULEB128.

Just cross-linking to https://github.com/llvm/llvm-project/issues/64102 - as we discussed at the last RISC-V LLVM sync-up we really would like to land this and get it into the LLVM 17 branch if possible, to avoid compatibility issues with the next binutils release.

Jul 26 2023, 9:04 PM · Restricted Project, Restricted Project
raj.khem added a comment to D154852: [FuncSpec] Add Phi nodes to the InstCostVisitor..

Thanks. Reverted. Looks like an infinite loop.

Jul 26 2023, 7:48 AM · Restricted Project, Restricted Project
raj.khem reopened D154852: [FuncSpec] Add Phi nodes to the InstCostVisitor..

I am seeing a crash in libLLVM-17.so when compiling socat on aarch64 and have narrowed it down to this change. here is testcase
https://uclibc.org/~kraj/nestlex.zip

Jul 26 2023, 2:07 AM · Restricted Project, Restricted Project

Jul 11 2023

raj.khem added a comment to D145302: [clangd] Add library for clangd main function.

indeed, broke my CI with same issue.

Jul 11 2023, 10:56 PM · Restricted Project, Restricted Project

Jul 5 2023

raj.khem added a comment to D154555: DAG: Implement soften float for ffrexp.

Thanks for the quick fix! However, I'm not convinced this is a trivial fix for https://github.com/llvm/llvm-project/issues/63661, thus it may introduce other problems and make reverting to a known good state even more complex. As I mentioned on https://reviews.llvm.org/rG003b58f65bdd5d9c7d0c1b355566c9ef430c0e7d#1223579, I'd prefer a revert to green before this fix gets tested and the commits starting from 003b58f65bdd5d9c7d0c1b355566c9ef430c0e7d are recommitted.

Jul 5 2023, 5:58 PM · Restricted Project, Restricted Project

Jul 3 2023

raj.khem added a comment to D135402: [LLD] Enable --no-undefined-version by default..

I am late to party I know. I am trying to enable lld as default system linker for one of yocto based distros and this option turned on by default now breaks quite a few packages on linux with this error

Jul 3 2023, 8:37 PM · Restricted Project, Restricted Project

Apr 26 2023

raj.khem added a comment to D149272: [clang] Call printName to get name of Decl.

This would fix https://github.com/llvm/llvm-project/issues/62192

Apr 26 2023, 8:56 PM · debug-info, Restricted Project, Restricted Project

Feb 22 2023

raj.khem updated the diff for D144514: Undef _TIME_BITS along with _FILE_OFFSET_BITS in sanitizers.
Feb 22 2023, 10:35 AM · Restricted Project, Restricted Project
raj.khem added a comment to D144514: Undef _TIME_BITS along with _FILE_OFFSET_BITS in sanitizers.
In D144514#4144195, @ro wrote:
  • You still haven't mentioned which target is affected.
  • There needs to be a comment explaining why _TIME_BITS is #undefed.
  • Please pass the patch through clang-format-diff.py: there's a TAB before !defined which should just be a blank.
Feb 22 2023, 9:55 AM · Restricted Project, Restricted Project
raj.khem updated the diff for D144514: Undef _TIME_BITS along with _FILE_OFFSET_BITS in sanitizers.
Feb 22 2023, 9:54 AM · Restricted Project, Restricted Project

Feb 21 2023

raj.khem added a comment to D144514: Undef _TIME_BITS along with _FILE_OFFSET_BITS in sanitizers.
In D144514#4142654, @ro wrote:

Please state what target the problem occurs on and how/where the patch was tested. _TIME_BITS doesn't exist on Solaris 11.4 and, AFAICS, neither on Illumos.

If the patch goes in, please add a comment why that #undef is needed.

That said, I wonder why sanitizer_platform_limits_posix.cpp doesn't have the same issue. It seems weird to me to work around a non-Solaris issue in a Solaris-specific file. ISTM that <features.h> is included in sanitizer_platform.h only to get a definition of __GLIBC__. I'd find it way more logical to handle the issue there, rather than in sanitizer_procmaps_solaris.cpp.

Feb 21 2023, 5:50 PM · Restricted Project, Restricted Project
raj.khem updated the diff for D144514: Undef _TIME_BITS along with _FILE_OFFSET_BITS in sanitizers.
Feb 21 2023, 5:48 PM · Restricted Project, Restricted Project
raj.khem requested review of D144514: Undef _TIME_BITS along with _FILE_OFFSET_BITS in sanitizers.
Feb 21 2023, 12:52 PM · Restricted Project, Restricted Project

Jan 30 2023

raj.khem added a comment to D139752: cmake: Enable 64bit off_t on 32bit glibc systems.

@raj.khem would you be able to figure out the issue? :) https://llvm.org/ release/16.x will be created soon...

I have been trying to reproduce it on my end but have not succeeded, I don't have same setup as @srj, I would also look for some alternative ways to do it so we can avoid the issue at hand which seems some weird cmake thing.

@srj It will be nice to figure out the 32-bit glibc Halide issue and fix this for just just-branched-release/16.x so that llvm-project 16.0 can be built with next musl release, otherwise many musl based distributions will have to carry this local patch...

I wonder if this could be a bug in a specific version(s) of CMake? What version(s) have you tried replicating with? Our buildbots are using v3.22.6 (Halide requires a minimum of 3.22).

Jan 30 2023, 9:41 AM · Restricted Project, Restricted Project

Jan 23 2023

raj.khem added a comment to D139752: cmake: Enable 64bit off_t on 32bit glibc systems.

@raj.khem would you be able to figure out the issue? :) https://llvm.org/ release/16.x will be created soon...

Jan 23 2023, 2:30 PM · Restricted Project, Restricted Project

Jan 19 2023

raj.khem added a comment to D141487: [LoopUnroll] Directly update DT instead of DTU..

this causes opt -passes=loop-unroll-full to crash on

define void @foo() {
bb:
  br label %bb1
    
bb1:                                              ; preds = %bb1, %bb1, %bb
  switch i1 true, label %bb1 [
    i1 true, label %bb2
    i1 false, label %bb1
  ]
    
 bb2:                                              ; preds = %bb1
  ret void
}

so I've reverted this for now

Jan 19 2023, 10:23 PM · Restricted Project, Restricted Project
raj.khem added a comment to D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library..

With this, I now get:
FAILED: bin/clangd-fuzzer
: && /usr/lib/icecream/libexec/icecc/bin/c++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O2 -g -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics -Wl,--gc-sections tools/clang/tools/extra/clangd/fuzzer/CMakeFiles/clangd-fuzzer.dir/FuzzerClangdMain.cpp.o tools/clang/tools/extra/clangd/fuzzer/CMakeFiles/clangd-fuzzer.dir/clangd-fuzzer.cpp.o -o bin/clangd-fuzzer -Wl,-rpath,"\$ORIGIN/../lib" lib/libclangDaemon.a lib/libclangdSupport.a lib/libclangPseudo.a lib/libclangPseudoGrammar.a lib/libclangTidyAndroidModule.a lib/libclangTidyAbseilModule.a lib/libclangTidyAlteraModule.a lib/libclangTidyBoostModule.a lib/libclangTidyCERTModule.a lib/libclangTidyConcurrencyModule.a lib/libclangTidyDarwinModule.a lib/libclangTidyFuchsiaModule.a lib/libclangTidyHICPPModule.a lib/libclangTidyBugproneModule.a lib/libclangTidyCppCoreGuidelinesModule.a lib/libclangTidyGoogleModule.a lib/libclangTidyLinuxKernelModule.a lib/libclangTidyLLVMModule.a lib/libclangTidyLLVMLibcModule.a lib/libclangTidyMiscModule.a lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangAST.a lib/libclangLex.a lib/libclangBasic.a lib/libclangTidyModernizeModule.a lib/libclangTidyObjCModule.a lib/libclangTidyOpenMPModule.a lib/libclangTidyPerformanceModule.a lib/libclangTidyPortabilityModule.a lib/libclangTidyReadabilityModule.a lib/libclangTidyZirconModule.a lib/libclangTidyMPIModule.a lib/libclangTidyUtils.a lib/libclangTidy.a lib/libclang-cpp.so.16git lib/libLLVM-16git.so && :
ld.lld: error: undefined symbol: clang::include_cleaner::walkUsed(llvm::ArrayRef<clang::Decl*>, llvm::ArrayRef<clang::include_cleaner::SymbolReference>, clang::include_cleaner::PragmaIncludes const*, clang::SourceManager const&, llvm::function_ref<void (clang::include_cleaner::SymbolReference const&, llvm::ArrayRef<clang::include_cleaner::Header>)>)

referenced by IncludeCleaner.cpp:504 (/sda/home/christian/dev/llvm/clang-tools-extra/clangd/IncludeCleaner.cpp:504)

IncludeCleaner.cpp.o:(clang::clangd::computeUnusedIncludesExperimental(clang::clangd::ParsedAST&) (.localalias)) in archive lib/libclangDaemon.a

sorry, should be fixed in https://github.com/llvm/llvm-project/commit/e84d69f52d9a9fab9162128d8fe8ebec99ea60da.

Jan 19 2023, 6:20 PM · Restricted Project, Restricted Project

Jan 12 2023

raj.khem requested review of D141656: [hwasan] Replace j __interceptor_sigsetjmp instead with tail for RISC-V.
Jan 12 2023, 10:24 PM · Restricted Project, Restricted Project

Jan 5 2023

raj.khem added a comment to D140948: [MIPS] compiler-rt: Fix stat struct's size for O32 ABI.

Is mips o32 still worth spending efforts? For mips perhaps we should only care about newer ABIs. Sanitizers are optional features anyway...

Jan 5 2023, 1:37 PM · Restricted Project, Restricted Project

Jan 3 2023

raj.khem requested review of D140948: [MIPS] compiler-rt: Fix stat struct's size for O32 ABI.
Jan 3 2023, 8:15 PM · Restricted Project, Restricted Project

Dec 31 2022

raj.khem requested review of D140812: [sanitizer] Undef _TIME_BITS along with _FILE_OFFSET_BITS on linux.
Dec 31 2022, 3:14 PM · Restricted Project, Restricted Project

Dec 9 2022

raj.khem requested review of D139752: cmake: Enable 64bit off_t on 32bit glibc systems.
Dec 9 2022, 4:53 PM · Restricted Project, Restricted Project

Sep 13 2022

raj.khem added a comment to D133751: [llvm-objdump] Change printSymbolVersionDependency to use ELFFile API.

The patch looks good to me. I have tested it in yocto world builds, it fixes the problem and there are no new regressions.

Sep 13 2022, 1:13 PM · Restricted Project, Restricted Project

Sep 12 2022

raj.khem added a comment to D129749: [Sanitizer][MIPS] Fix stat struct size for the O32 ABI.

I think this patch has created regression when using largefile support. So try adding -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to compiler cmdline on mips (o32 ABI) and the size of this struct is bumped to 160 on linux/glibc see definition of stat for mips in glibc

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/mips/bits/struct_stat.h;h=71594e456244d1e4a746c859048793385c5be376;hb=HEAD#l28

Thanks for pointing this out @raj.khem.

As far as I can see, -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 is expected by default for the O32 ABI in LLVM - see https://github.com/llvm/llvm-project/blob/main/compiler-rt/cmake/base-config-ix.cmake#L224. GCC, however, doesn't follow this - please see the following discussion https://gcc.gnu.org/pipermail/gcc-patches/2022-July/597617.html.

Rather than working with CMake, shouldn't we be able to just add a check if _LARGEFILE_SOURCE is defined and if _FILE_OFFSET_BITS is defined and equal to 64? If it is so, struct_kernel_stat_sz would be equal to 160, rather than 144 (for the O32 ABI). This change would then be cherry-picked into GCC. Thus we would cover every possible case for both LLVM and GCC.

The problem is we need to ensure libsanitizer functional properly, not just papering over the issue and make it build. That's the point of why we define our own value of struct_kernel_stat_sz and check it with COMPILER_CHECK, instead of just using sizeof(struct stat).

Sep 12 2022, 8:17 AM · Restricted Project, Restricted Project

Sep 11 2022

raj.khem added a comment to D129749: [Sanitizer][MIPS] Fix stat struct size for the O32 ABI.

I think this patch has created regression when using largefile support. So try adding -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to compiler cmdline on mips (o32 ABI) and the size of this struct is bumped to 160 on linux/glibc see definition of stat for mips in glibc

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/mips/bits/struct_stat.h;h=71594e456244d1e4a746c859048793385c5be376;hb=HEAD#l28

Hmm, so should we force -D_FILE_OFFSET_BITS=64 in the C compiler (clang and gcc) when -fsanitize=address is used? AFAIK There is nothing we can do to support both cases (with or w/o -D_FILE_OFFSET_BITS=64) in one libsanitizer build.

Sep 11 2022, 8:52 PM · Restricted Project, Restricted Project
raj.khem added a comment to D129749: [Sanitizer][MIPS] Fix stat struct size for the O32 ABI.

I think this patch has created regression when using largefile support. So try adding -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 to compiler cmdline on mips (o32 ABI) and the size of this struct is bumped to 160 on linux/glibc see definition of stat for mips in glibc

Sep 11 2022, 3:51 PM · Restricted Project, Restricted Project

Sep 6 2022

raj.khem added a comment to D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO.

I believe this patch is still relevant/necessary when using LTO for RISCV, so can I ask if @khchen is able to update it to rebase/address the feedback? If not, are there are any objections to me commandeering this revision to get it landed?

Sep 6 2022, 8:15 PM · Restricted Project, Restricted Project

Aug 23 2022

raj.khem accepted D132390: [MCContext] Reverse order of DebugPrefixMap sort for generated assembly debug info.

My local testing on clang-15 shows no problems with this patch so lgtm

Aug 23 2022, 9:55 PM · Restricted Project, Restricted Project

Aug 14 2022

raj.khem accepted D131848: [DebugInfo] -fdebug-prefix-map: handle '#line "file"' for asm source.

I have tested this revision and it fixes the problem I was seeing

Aug 14 2022, 8:27 AM · Restricted Project, Restricted Project

Aug 12 2022

raj.khem added a comment to D131749: [MCDwarf] Respect -fdebug-prefix-map= for generated assembly debug info (DWARF v5).

I am getting a compiler error on clang-15, can you confirm if this will work with clang-15 too

Aug 12 2022, 1:20 AM · Restricted Project, Restricted Project

Mar 25 2022

raj.khem accepted D122505: [llvm-objdump] --private-headers: change errors to warnings for dynamic section dumping.

I built this on top if 14.x branch and it fixes the problems, I was seeing and the warning is still emitted as expected.

Mar 25 2022, 2:33 PM · Restricted Project, Restricted Project
Herald added a project to D68249: [llvm-objdump] Don't throw error for empty dynamic section: Restricted Project.

I have submitted a github issue which seems to be related here https://github.com/llvm/llvm-project/issues/54456

Mar 25 2022, 9:13 AM · Restricted Project, Restricted Project

Mar 10 2022

raj.khem updated the diff for D104183: [builtins] Do not force thumb mode directive in arm/sync-ops.h.

rebased

Mar 10 2022, 9:10 PM · Restricted Project, Restricted Project
raj.khem added a comment to D99282: Use mcr for dmb instruction on armv6.

@MaskRay can you help in moving this forward ?

Mar 10 2022, 7:24 PM · Restricted Project, Restricted Project
raj.khem updated the diff for D99282: Use mcr for dmb instruction on armv6.

rebased

Mar 10 2022, 7:23 PM · Restricted Project, Restricted Project
Herald added a project to D104183: [builtins] Do not force thumb mode directive in arm/sync-ops.h: Restricted Project.

@peter.smith Can you help landing this changeset ? there has been no objections on it thus far.

Mar 10 2022, 7:19 PM · Restricted Project, Restricted Project
raj.khem updated the diff for D121379: [compiler-rt][CMake] Enable TF intrinsics on powerpc32 Linux.
Mar 10 2022, 7:17 PM · Restricted Project, Restricted Project
raj.khem added a comment to D121379: [compiler-rt][CMake] Enable TF intrinsics on powerpc32 Linux.

Note: powerpc64 defines __powerpc__ as well. You need to check whether powerpc64 needs this as well.

Mar 10 2022, 1:59 PM · Restricted Project, Restricted Project
raj.khem updated the summary of D121379: [compiler-rt][CMake] Enable TF intrinsics on powerpc32 Linux.
Mar 10 2022, 7:52 AM · Restricted Project, Restricted Project
raj.khem requested review of D121379: [compiler-rt][CMake] Enable TF intrinsics on powerpc32 Linux.
Mar 10 2022, 7:47 AM · Restricted Project, Restricted Project
Herald added a project to D119590: exclude openembedded distributions from setting rpath on openmp executables: Restricted Project.

Cross compilers are a hazard here. I'd expect there to be a fairly long list of magic flags you need to pass to clang to get it to find the right libraries. Can you add fno-openmp-implicit-rpath to that list instead?

Mar 10 2022, 7:22 AM · Restricted Project, Restricted Project

Feb 11 2022

raj.khem requested review of D119590: exclude openembedded distributions from setting rpath on openmp executables.
Feb 11 2022, 1:31 PM · Restricted Project, Restricted Project

Feb 7 2022

raj.khem added a comment to D119186: [lldb][gdb-remote] Fix linking of gdb-remote when LLVM_ENABLE_ZLIB is ON.

I tested this patch and it fixes lldb build. Thanks for taking care of this,.

Feb 7 2022, 5:13 PM · Restricted Project
raj.khem added a comment to D119058: Fix lld standalone build.

Move LLVM_ENABLE_ZLIB

Feb 7 2022, 11:46 AM · Restricted Project, lld

Aug 28 2021

raj.khem accepted D108868: [libomptarget][amdcgn] Only add opt/llvm-link dependency if TARGET is available.

I verified both patches together on latest 13.x branch and it fixes the issue I was seeing. So please apply both the fixes suggested in description to 13.x branch.

Aug 28 2021, 2:04 PM · Restricted Project, Restricted Project

Aug 27 2021

raj.khem added a comment to D107156: [libomptarget][amdcgn] Add build dependency for opt.

The current trunk cmake guards whether to build this with:

if (LLVM_DIR)
  # Builds that use pre-installed LLVM have LLVM_DIR set.                                                                                                                                                          
  find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
  find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
    NO_DEFAULT_PATH)
  find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
  libomptarget_say("Building AMDGCN device RTL. Using clang: ${CLANG_TOOL}")
elseif (LLVM_TOOL_CLANG_BUILD AND NOT CMAKE_CROSSCOMPILING AND NOT OPENMP_STANDALONE_BUILD)
  # LLVM in-tree builds may use CMake target names to discover the tools.                                                                                                                                          
  set(CLANG_TOOL $<TARGET_FILE:clang>)
  set(LINK_TOOL $<TARGET_FILE:llvm-link>)
  set(OPT_TOOL $<TARGET_FILE:opt>)
  libomptarget_say("Building AMDGCN device RTL. Using clang from in-tree build")
else()
  libomptarget_say("Not building AMDGCN device RTL. No appropriate clang found")
  return()
endif()

standalone cross-build

Which path are you hitting? Can grep for 'Building AMDGCN device RTL' to see which.

Aug 27 2021, 3:38 PM · Restricted Project
raj.khem added a comment to D107156: [libomptarget][amdcgn] Add build dependency for opt.

This breaks a case where opt is used from installed locations especially in standalone cross-build environment we pass -DOPT_TOOL=${STAGING_BINDIR_NATIVE}/opt and it worked ok but now its expecting opt to be built along with openmp build and fails like below

Aug 27 2021, 1:30 PM · Restricted Project

Jun 23 2021

raj.khem abandoned D104821: Fix openmp build on arm.

https://reviews.llvm.org/D104788 fixes it as well.

Jun 23 2021, 11:08 PM · Restricted Project
raj.khem added a comment to D104821: Fix openmp build on arm.

Does D104788 take care of it?

Jun 23 2021, 11:07 PM · Restricted Project
raj.khem requested review of D104821: Fix openmp build on arm.
Jun 23 2021, 2:45 PM · Restricted Project

Jun 15 2021

raj.khem added a comment to D104183: [builtins] Do not force thumb mode directive in arm/sync-ops.h.

For ELF targets I think this should work fine. However looking at the previous change I think this may break the Darwin build. This change looks like it reverts:

commit 84610ba9b38d917317ac997074acacd99962d767
Author: Steven Wu <stevenwu@apple.com>
Date:   Sat Oct 4 00:18:59 2014 +0000

    Fix the armv7 thumb builtins on darwin

    The arm builtins converted into thumb in r213481 are not working
    on darwin. On apple platforms, .thumb_func directive is required
    to generated correct symbols for thumb functions.

    <rdar://problem/18523605>

    llvm-svn: 219040

I think we'll need a way to get .thumb_func added for Darwin or potentially call DEFINE_COMPILERRT_FUNCTION for Armv6.

Jun 15 2021, 12:31 PM · Restricted Project, Restricted Project

Jun 14 2021

raj.khem added inline comments to D99282: Use mcr for dmb instruction on armv6.
Jun 14 2021, 12:39 AM · Restricted Project, Restricted Project

Jun 12 2021

raj.khem added a comment to D104183: [builtins] Do not force thumb mode directive in arm/sync-ops.h.

Some platforms (e.g. WoA) do require thumb-only compilation. Can we conditionalize this on whether we are building for ARMv6 or not?

Jun 12 2021, 9:29 AM · Restricted Project, Restricted Project
raj.khem requested review of D104183: [builtins] Do not force thumb mode directive in arm/sync-ops.h.
Jun 12 2021, 9:09 AM · Restricted Project, Restricted Project
raj.khem added a reviewer for D99282: Use mcr for dmb instruction on armv6: phosek.

ping,

Jun 12 2021, 8:56 AM · Restricted Project, Restricted Project

Jun 3 2021

raj.khem added a comment to D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable.

http://sprunge.us/FJzZXL is a file from harfbuzz and it warns

Jun 3 2021, 9:04 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

May 21 2021

raj.khem added a comment to D102872: Fix lldb-server build failure on mips.

I assume this is caused by the removal of the specific NativeRegisterContextLinux_mips and you are building lldb on MIPS but you're going to connect to another debug server (gdb, custom stub etc.).

The problem with doing it this way is then if you build on a supported platform e.g. AArch64 NativeRegisterContextLinux_arm64 we then have two copies of CreateHostNativeRegisterContextLinux. Somehow this isn't an error on my system, and it picks up the one you've added. Meaning that you can't debug a simple hello world.

See the comment in lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h. (though again I'd have expect a hard linker error but anyway) Also the reason CI didn't fail is that lldb is disabled for both of the builds.

I can see the utility in allowing people to build at least lldb (client) on any platform. Perhaps we surround this in the #ifdef that the old mips register context used? Or modify our cmake to allow lldb-server to be disabled. (easier said than done)

May 21 2021, 8:54 AM · Restricted Project

May 20 2021

raj.khem updated the diff for D102872: Fix lldb-server build failure on mips.
May 20 2021, 2:22 PM · Restricted Project
raj.khem added a reviewer for D102872: Fix lldb-server build failure on mips: labath.
May 20 2021, 1:43 PM · Restricted Project
raj.khem requested review of D102872: Fix lldb-server build failure on mips.
May 20 2021, 1:41 PM · Restricted Project

May 17 2021

raj.khem accepted D102568: [Driver] Delete -mimplicit-it=.

LGTM

May 17 2021, 7:05 PM · Restricted Project

May 14 2021

raj.khem added a comment to D102535: [RISCV] -mno-relax: emit .option norelax.

I view this as a bug in whatever calls the assembler; it should be passing -mno-relax, just as it needs to pass -fPIC as appropriate.

I'll use the -g analogy. clang -S -g emits debug info and leaves a .debug_line marker so that the assembler knows it needs to synthesize debug info and should not synthesize .debug_info from ELF symbols.
The assembler doesn't need -g to function.

For .option nopic, I agree it is not useful.

The two aren't comparable. Relaxation affects assembling and not code generation. Debug info affects code generation to emit all the information that's otherwise lost (the assembly doesn't have a copy of your source code...). Even PIC is more useful than .option norelax, as it affects what instructions get used to lower global addresses etc.

I think the -Wa,-mno-relax argument is justified if code generation cannot affect relaxation (which I am unsure).

Can GCC base assembly emission decisions on -mno-relax?

May 14 2021, 3:39 PM · Restricted Project

Mar 25 2021

raj.khem added a comment to D96213: Fix compiler-rt build on musl.

@MaskRay I dont find this in main branch yet, anything pending on me ?

Mar 25 2021, 9:53 PM · Restricted Project

Mar 24 2021

raj.khem accepted D99308: [Triple][Driver] Add muslx32 environment and use /lib/ld-musl-x32.so.1 for -dynamic-linker.

once you fix the clang-format issue reported this looks good to me.

Mar 24 2021, 9:51 PM · Restricted Project, Restricted Project
raj.khem added a comment to D65572: Fix static linking failure with --unwindlib=libunwind.

@MaskRay how should be proceeed here

Mar 24 2021, 11:12 AM · Restricted Project
raj.khem abandoned D71369: Detect libdl from cmake variable.

0073c293a401774ac96b4b3d27f05e13f379f98e has fixed it.

Mar 24 2021, 11:09 AM · Restricted Project
raj.khem added a comment to D70636: Add Cmake Check for atomic<double> intrinsic.

Can someone review this please?

Mar 24 2021, 11:07 AM · Restricted Project
raj.khem abandoned D35696: Fix compiler-rt build with aarch64 using -march=armv8-a.

this is because warning were disabled during cmake tests

Mar 24 2021, 11:05 AM
raj.khem added a reviewer for D36809: Fix ldso name for for musl on x86 and x32 architectures: MaskRay.
Mar 24 2021, 11:02 AM
raj.khem abandoned D46914: Run scan-view on systems with python3 as default python provider.

it works with python3 too, perhaps it would be good to ask for python3 instead

Mar 24 2021, 11:01 AM
raj.khem abandoned D18174: Fix libcxx build on musl.

this is no longer needed.

Mar 24 2021, 10:58 AM
raj.khem added inline comments to D96213: Fix compiler-rt build on musl.
Mar 24 2021, 10:54 AM · Restricted Project
raj.khem updated the diff for D96213: Fix compiler-rt build on musl.
Mar 24 2021, 10:53 AM · Restricted Project
raj.khem requested review of D99282: Use mcr for dmb instruction on armv6.
Mar 24 2021, 10:49 AM · Restricted Project, Restricted Project

Feb 25 2021

raj.khem requested review of D97477: sort ClassInfo lists by name.
Feb 25 2021, 8:32 AM · Restricted Project

Feb 8 2021

raj.khem added a comment to D86173: Don't look for terminfo libs when LLVM_ENABLE_TERMINFO=OFF.

I am still seeing build failures in NATIVE/llvm-config when I am cross building clang for say aarch64 on a x86_64 host. Even when I specify -DLLVM_ENABLE_TERMINFO=OFF, it still goes and pokes for these ncurses libs on build host and adds them to linker cmd. Since my target rootfs is set to not have these libs the final link fails to find -lterminfo rightly. Surprisingly, non NATIVE parts work ok and seem to respect LLVM_ENABLE_TERMINFO settings. Any insights ?

Feb 8 2021, 8:58 AM · Restricted Project, Restricted Project

Feb 6 2021

raj.khem requested review of D96213: Fix compiler-rt build on musl.
Feb 6 2021, 1:46 PM · Restricted Project

Feb 4 2021

raj.khem added a comment to D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.

Can we get this on clang 12 release branch as well ?

Feb 4 2021, 8:58 AM · Restricted Project

Nov 17 2020

raj.khem added a comment to D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.

I don't understand why this has its place in libc++. Shouldn't this be in glibc instead?

Nov 17 2020, 1:55 PM · Restricted Project

Nov 16 2020

raj.khem updated the diff for D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.

it should have been after including syscall.h

Nov 16 2020, 1:36 PM · Restricted Project

Nov 14 2020

raj.khem retitled D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32 from Fix libcxx build on riscv32 to Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.
Nov 14 2020, 2:59 PM · Restricted Project
raj.khem updated the diff for D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.

Add comments in source

Nov 14 2020, 2:56 PM · Restricted Project
raj.khem added a comment to D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.

Can you clarify on the errors you are talking about? Are you building LLVM libc++with glibc?
I have been building LLVM libc++ with MUSl and I do not see a build issue.

Nov 14 2020, 2:51 PM · Restricted Project
raj.khem updated the diff for D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.

this revision is not riscv32 specific. Let me know if this is ok

Nov 14 2020, 2:50 PM · Restricted Project

Aug 3 2020

raj.khem added inline comments to D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.
Aug 3 2020, 10:28 AM · Restricted Project

Aug 2 2020

raj.khem updated the diff for D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.

Fix formatting errors

Aug 2 2020, 10:39 AM · Restricted Project
raj.khem requested review of D85095: Fix libcxx build on 32bit architectures with 64bit time_t defaults e.g. riscv32.
Aug 2 2020, 10:18 AM · Restricted Project

Jan 7 2020

raj.khem added a comment to D70764: build: reduce CMake handling for zlib.

this is now in master, and I am seeing build failures in cross-building clang, e.g. when building clang for arm on a x86_64 host. its resorting to finding, libz from buildhost instead of target sysroot ( using --sysroot) and failing in link step. e.g.

FAILED: bin/llvm-config
...
.... -o bin/llvm-config -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMSupport.a /usr/lib/libz.so -lrt -ldl -ltinfo -lm lib/libLLVMDemangle.a
...

aarch64-yoe-linux-musl/aarch64-yoe-linux-musl-ld: /usr/lib/libz.so: error adding symbols: file in wrong format
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)

you can see that its adding /usr/lib/libz.so to linker cmdline while cross linking.

Have you set CMAKE_SYSROOT appropriately?

Jan 7 2020, 9:08 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Jan 3 2020

raj.khem added a comment to D70764: build: reduce CMake handling for zlib.

this is now in master, and I am seeing build failures in cross-building clang, e.g. when building clang for arm on a x86_64 host. its resorting to finding, libz from buildhost instead of target sysroot ( using --sysroot) and failing in link step. e.g.

Jan 3 2020, 12:51 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Dec 28 2019

raj.khem created D71965: include missing <cstdlib> for std::abort.
Dec 28 2019, 10:48 AM · Restricted Project, Restricted Project
raj.khem edited reviewers for D71369: Detect libdl from cmake variable, added: mehdi_amini; removed: espindola.
Dec 28 2019, 10:39 AM · Restricted Project

Dec 11 2019

raj.khem created D71369: Detect libdl from cmake variable.
Dec 11 2019, 11:10 AM · Restricted Project

Dec 10 2019

raj.khem accepted D71302: [llvm-ar] Improve tool selection logic.

LGTM now. I am testing it in yocto multilib SDK builds.

Dec 10 2019, 3:57 PM · Restricted Project