Page MenuHomePhabricator

lancethepants (Lance Fredrickson)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 10 2020, 10:14 AM (99 w, 2 d)

Recent Activity

May 23 2022

lancethepants abandoned D126071: [benchmark] getloadavg not supported under uclibc-ng..
May 23 2022, 7:18 AM · Restricted Project, Restricted Project
lancethepants added a comment to D126071: [benchmark] getloadavg not supported under uclibc-ng..

I did get this upstreamed so this patch no longer needed.
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=ad3a130dad88ad7a59dcd965b0cf9bd0d713595e

May 23 2022, 7:17 AM · Restricted Project, Restricted Project

May 20 2022

lancethepants added a comment to D126071: [benchmark] getloadavg not supported under uclibc-ng..

Going to see about adding getloadavg to upstream uclibc-ng first so hold on this.

May 20 2022, 2:20 PM · Restricted Project, Restricted Project
lancethepants requested review of D126071: [benchmark] getloadavg not supported under uclibc-ng..
May 20 2022, 7:54 AM · Restricted Project, Restricted Project

Feb 15 2022

lancethepants added a comment to D119804: [docs] HowToCrossCompileLLVM.rst: update cmake options.

Good needed change.

Feb 15 2022, 6:53 AM · Restricted Project

Jan 19 2022

lancethepants added a comment to D93164: [AST] Add generator for source location introspection.

@lancethepants @smeenai thanks for the pointers! Unfortunately, it still doesn't work for me after passing -DCMAKE_SYSTEM_NAME="Linux". Passing that option did change the CMake output, so it's definitely recognized at least (the messages about which sanitizer tests will run now call the platform "Linux" as opposed to referring to the platform as default). I am also compiling on Linux for Linux, I'm just trying to build an AArch64 toolchain which I can copy to an SD card for testing on an AArch64 board. @lancethepants could you check your CMake version where you got this to work? I'm using CMake 3.22.1 and trying to build llvmorg-13.0.0

The full invocation I'm using is the following:

cmake -G Ninja \
  -DLLVM_TABLEGEN=${TOP}/${CLANG_TBLGEN_DIR}/bin/llvm-tblgen \
  -DCLANG_TABLEGEN=${TOP}/${CLANG_TBLGEN_DIR}/bin/clang-tblgen \
  -DCMAKE_SYSTEM_NAME="Linux" \
  -DCMAKE_CROSSCOMPILING=ON \
  -DCLANG_TOOLING_BUILD_AST_INTROSPECTION=OFF \
  -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
  -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
  -DCMAKE_BUILD_TYPE=MinSizeRel \
  -DCMAKE_INSTALL_PREFIX=${TOP}/${ROOT_DIR} \
  -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-linux-gnu \
  -DLLVM_NATIVE_ARCH="X86" \
  -DLLVM_TARGET_ARCH="AArch64" \
  -DLLVM_TARGETS_TO_BUILD="AArch64" \
  -DLLVM_ENABLE_PROJECTS="clang;compiler-rt;lld;" \
  -DLLVM_ENABLE_TERMINFO=OFF \
  -DLLVM_ENABLE_BINDINGS=OFF \
  -DLLVM_BUILD_EXAMPLES=OFF \
  -DLLVM_BUILD_TESTS=OFF \
  -DLLVM_BUILD_BENCHMARKS=OFF \
  ${TOP}/${SRC_DIR}/llvm/
Jan 19 2022, 8:12 AM · Restricted Project, Restricted Project

Jan 18 2022

lancethepants added a comment to D93164: [AST] Add generator for source location introspection.

This change breaks cross-compilation now, as it tries running an executable built for the target system:

FAILED: tools/clang/lib/Tooling/ASTNodeAPI.json 
cd /home/mgorny/llvm-project/build.arm64/tools/clang/lib/Tooling && /home/mgorny/llvm-project/build.arm64/bin/clang-ast-dump --skip-processing=0 --astheader=/home/mgorny/llvm-project/build.arm64/tools/clang/lib/Tooling/ASTTU.cpp -I /home/mgorny/llvm-project/build.arm64/lib/clang/13.0.0/include -I /home/mgorny/llvm-project/llvm/../clang/include -I /home/mgorny/llvm-project/build.arm64/tools/clang/include -I /home/mgorny/llvm-project/build.arm64/include -I /home/mgorny/llvm-project/llvm/include -I /sysroot/arm64/usr/include/c++/v1 -I /usr/lib/clang/11.0.1/include -I /sysroot/arm64/usr/include --json-output-path /home/mgorny/llvm-project/build.arm64/tools/clang/lib/Tooling/ASTNodeAPI.json
/bin/sh: /home/mgorny/llvm-project/build.arm64/bin/clang-ast-dump: Exec format error

I guess you can look at TableGens how to correctly generate and use host executables.

I am now running into this error now that clang13 has released. I cannot figure a way around this. I do not see any cmake options similar to the tablegens that allow you to specify the binary for the build system. Am I missing something or is clang13 just broken for cross compilation?

Another confirmation that this change has broken cross compilation. I have tried setting both -DCLANG_TOOLING_BUILD_AST_INTROSPECTION=OFF and -DCMAKE_CROSSCOMPILING=ON separately and in combination. This means that LLVM cannot be cross compiled for AArch64, which is a pretty serious problem!

Jan 18 2022, 1:42 PM · Restricted Project, Restricted Project

Oct 7 2021

lancethepants added a comment to D93164: [AST] Add generator for source location introspection.

This change breaks cross-compilation now, as it tries running an executable built for the target system:

FAILED: tools/clang/lib/Tooling/ASTNodeAPI.json 
cd /home/mgorny/llvm-project/build.arm64/tools/clang/lib/Tooling && /home/mgorny/llvm-project/build.arm64/bin/clang-ast-dump --skip-processing=0 --astheader=/home/mgorny/llvm-project/build.arm64/tools/clang/lib/Tooling/ASTTU.cpp -I /home/mgorny/llvm-project/build.arm64/lib/clang/13.0.0/include -I /home/mgorny/llvm-project/llvm/../clang/include -I /home/mgorny/llvm-project/build.arm64/tools/clang/include -I /home/mgorny/llvm-project/build.arm64/include -I /home/mgorny/llvm-project/llvm/include -I /sysroot/arm64/usr/include/c++/v1 -I /usr/lib/clang/11.0.1/include -I /sysroot/arm64/usr/include --json-output-path /home/mgorny/llvm-project/build.arm64/tools/clang/lib/Tooling/ASTNodeAPI.json
/bin/sh: /home/mgorny/llvm-project/build.arm64/bin/clang-ast-dump: Exec format error

I guess you can look at TableGens how to correctly generate and use host executables.

Oct 7 2021, 8:10 AM · Restricted Project, Restricted Project

Nov 10 2020

lancethepants retitled D91194: C_INCLUDE_DIRS, when adding a relative path, fixes joining sysroot to the relative path. from Fixes an issue where adding a relative path to the C include Directories via the C_INCLUDE_DIRS compile time option, there is a "/" ommitted to join the sysroot and the supplied relative path. Sysroot is not expected to have a trailing "/", and... to C_INCLUDE_DIRS, when adding a relative path, fixes joining sysroot to the relative path..
Nov 10 2020, 11:52 AM · Restricted Project
lancethepants requested review of D91194: C_INCLUDE_DIRS, when adding a relative path, fixes joining sysroot to the relative path..
Nov 10 2020, 11:38 AM · Restricted Project