Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/IR/IntrinsicsLoongArch.td | ||
---|---|---|
45 | Seems this arg is unnecessary because the defalut value is []. |
llvm/include/llvm/IR/IntrinsicsLoongArch.td | ||
---|---|---|
45 | Thanks, I will modify it. |
llvm/test/CodeGen/LoongArch/intrinsic-error.ll | ||
---|---|---|
11 | It's better to add a test that immediate is out of range. |
llvm/test/CodeGen/LoongArch/intrinsic-error.ll | ||
---|---|---|
11 | Thanks, I will add test cases. |
Hi, this seems to be causing some problems when generating Xcode project.
When I try to generate the Xcode project with the following command:
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_IDE=ON -DLLVM_CCACHE_BUILD=ON ../../llvm
I get the following error:
CMake Error in /path/to/llvm-project/clang/lib/Headers/CMakeLists.txt:
The custom command generating /path/to/llvm-project/build/Xcode-Debug/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lib/clang/16/include/larchintrin.h is attached to multiple targets: clang-resource-headers loongarch-resource-headers but none of these is a common dependency of the other(s). This is not allowed by the Xcode "new build system".CMake Error in /path/to/llvm-project/third-party/benchmark/CMakeLists.txt:
The custom command generating /path/to/llvm-project/build/Xcode-Debug/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lib/clang/16/include/larchintrin.h is attached to multiple targets: clang-resource-headers loongarch-resource-headers but none of these is a common dependency of the other(s). This is not allowed by the Xcode "new build system".
Thank you for your input. Correct me if I'm wrong, when I create a new build directory and execute the following command:
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_IDE=ON -DLLVM_CCACHE_BUILD=ON ../../llvm
I get the following error:
CMake Error: Could not create named generator Xcode Generators Unix Makefiles = Generates standard UNIX makefiles. Ninja = Generates build.ninja files. Watcom WMake = Generates Watcom WMake makefiles. CodeBlocks - Ninja = Generates CodeBlocks project files. CodeBlocks - Unix Makefiles = Generates CodeBlocks project files. CodeLite - Ninja = Generates CodeLite project files. CodeLite - Unix Makefiles = Generates CodeLite project files. Sublime Text 2 - Ninja = Generates Sublime Text 2 project files. Sublime Text 2 - Unix Makefiles = Generates Sublime Text 2 project files. Kate - Ninja = Generates Kate project files. Kate - Unix Makefiles = Generates Kate project files. Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files. Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
But when I change Xcode to Ninja, no error output is generated.
Do you have any suggestions for reproducing the bugs you mentioned?
I realized that it might be my environment that prevented me from repeating this problem. Can you use https://reviews.llvm.org/D138403 to solve this problem?
I get the following error:
CMake Error: Could not create named generator Xcode
Sorry, I forgot to mention that Xcode is only available on macOS.
But when I change Xcode to Ninja, no error output is generated.
Indeed. Ninja works fine for me as well. The problem is I kind of need both Xcode and Ninja in my workflow (Xcode for editing, Ninja for building).
Do you have any suggestions for reproducing the bugs you mentioned?
I think the following steps should be able to reproduce the error messages I'm seeing (It's a bit long):
- Install macOS 12.6 or newer. (I'm currently on 12.6, but newer versions such as 12.6.1 and 13 (the latest) should produce the same error messages.)
- Install Xcode 14.1 and/or the Xcode command line tools
- Xcode can be installed via this link (generally recommended), or from the Mac App Store via this link.
- The first link downloads a .xip file which can take a long time to decompress. This step can be sped up significantly by decompressing the file using this tool.
- The command line tools can be installed via this link, via the following commands, or by launching Xcode after it's installed. (I don't remember it clearly, but I think you probably can skip this step and have Homebrew install it for you in step 3)
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
- Xcode can be installed via this link (generally recommended), or from the Mac App Store via this link.
- Install LLVM's dependencies via Homebrew
- First we need to install brew using the following command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Then install Cmake and Python with brew. (I'm not sure if Python is really needed)
brew install cmake python
- First we need to install brew using the following command
- Clone LLVM and create the build directory.
- Generate Xcode project using CMake.
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_IDE=ON -DLLVM_CCACHE_BUILD=ON path/to/llvm
Flags other than -G "Xcode" probably are optional for the purpose of reproducing the error messages.
Seems this arg is unnecessary because the defalut value is [].