Skip to content

Commit

Permalink
Revert "llvm: use proper syntax for --config option"
Browse files Browse the repository at this point in the history
This reverts commit 577d47f.

The --config= syntax with the equal sign does not work with clang 15
which is less than one year old (https://releases.llvm.org/). It does
not work with clang 14 either.

```
clang --verbose
clang version 15.0.7

clang --help | grep config

  -cl-std=<value>         OpenCL language standard to compile for.
  --config   <value>      Specifies configuration file
  --cuda-feature=<value>  Manually specify the CUDA feature to use

clang: error: unsupported option '--config=/home/runner/work/...
```

The reverted commit mentioned "issues in some situations" without
providing any example or other information.
This revert fixes the SOF fuzzer build, see more details in #61778.

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb authored and carlescufi committed Aug 31, 2023
1 parent 99c1942 commit 0fead68
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmake/toolchain/llvm/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ elseif(CONFIG_COMPILER_RT_RTLIB)
set(runtime_lib "compiler_rt")
endif()

list(APPEND TOOLCHAIN_C_FLAGS
"--config=${ZEPHYR_BASE}/cmake/toolchain/llvm/clang_${runtime_lib}.cfg"
)
list(APPEND TOOLCHAIN_LD_FLAGS
"--config=${ZEPHYR_BASE}/cmake/toolchain/llvm/clang_${runtime_lib}.cfg"
)
list(APPEND TOOLCHAIN_C_FLAGS --config
${ZEPHYR_BASE}/cmake/toolchain/llvm/clang_${runtime_lib}.cfg)
list(APPEND TOOLCHAIN_LD_FLAGS --config
${ZEPHYR_BASE}/cmake/toolchain/llvm/clang_${runtime_lib}.cfg)

0 comments on commit 0fead68

Please sign in to comment.