Skip to content

[llvm-lit] Environment variable not found in clang subproject with lit internal shell #106601

@Harini0924

Description

@Harini0924

Currently, there are multiple environment variables are not recognized within the clang subproject, resulting in test failures when using the lit internal shell.
Example of error message

RUN: DEFAULT_TRIPLE=`%t/clang --version | grep "Target:" | cut -d ' ' -f2`

This error indicates that the internal shell is misinterpreting environment variable assignments as commands, leading to these failures.

files with failure:

  • clang/test/ClangScanDeps/pr61006.cppm
  • clang/test/Driver/coverage.c
  • clang/test/Driver/program-path-priority.c
  1. CMAKE config:
cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;llvm;clang-tools-extra;lld;lldb;bolt;mlir;libclc;polly" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libunwind;libcxxabi" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build -S .
  1. LIT_USE_INTERNAL_SHELL=1 ninja check-clang

Metadata

Metadata

Assignees

No one assigned

    Labels

    clangClang issues not falling into any other categorytest-suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions