[PATCH] D136906: [Clang][LoongArch] Implement __builtin_loongarch_dbar builtin

冀卓疌 via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 21 00:47:13 PST 2022


WowbaggersLiquidLunch added a comment.

> 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):

1. 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.)

2. Install Xcode 14.1 and/or the Xcode command line tools
  - Xcode can be installed via this link <https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_14.1/Xcode_14.1.xip> (generally recommended), or from the Mac App Store via this link <https://apps.apple.com/us/app/xcode/id497799835?mt=12>.
    - 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 <https://github.com/saagarjha/unxip>.
  - The command line tools can be installed via this link <https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_14.1/Command_Line_Tools_for_Xcode_14.1.dmg>, 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`

3. Install LLVM's dependencies <https://llvm.org/docs/GettingStarted.html#software> via Homebrew
  - First we need to install brew <https://brew.sh> 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`

4. Clone LLVM and create the build directory.
5. 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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136906/new/

https://reviews.llvm.org/D136906



More information about the cfe-commits mailing list