This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Remove the Xcode project
ClosedPublic

Authored by JDevlieghere on Jul 22 2019, 1:05 PM.

Details

Summary

Finally, after a lot of hard work from a bunch of people, we're in a state where we can unify LLDB's build system. This patch removes the hand-maintained Xcode project in favor of using CMake in combination with the Xcode generator.

I've included a new script to streamline the process: it creates two build directories in the current directory. The first directory is for LLVM and Clang which uses Ninja to build. The second directory is for LLBD, which configures a standalone build using the Xcode generator.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Jul 22 2019, 1:05 PM
JDevlieghere edited the summary of this revision. (Show Details)Jul 22 2019, 1:11 PM

I am fine with removing the Xcode project. Others should ok it too.

I've included a new script to streamline the process: it creates two build directories in the current directory. The first directory is for LLVM and Clang which uses Ninja to build. The second directory is for LLBD, which configures a standalone build using the Xcode generator.

Not sure why we need two different build directories? Can we just use the mono-repo style build and use "cmake -G Xcode"? Or is this just to appease the Apple build process?

I am fine with removing the Xcode project. Others should ok it too.

I've included a new script to streamline the process: it creates two build directories in the current directory. The first directory is for LLVM and Clang which uses Ninja to build. The second directory is for LLBD, which configures a standalone build using the Xcode generator.

Not sure why we need two different build directories? Can we just use the mono-repo style build and use "cmake -G Xcode"? Or is this just to appease the Apple build process?

I'll defer to @sgraenitz to answer this since he did the work. :-)

lanza added a subscriber: lanza.Jul 22 2019, 1:25 PM
lanza added inline comments.
lldb/utils/xcode.py
1 ↗(On Diff #211171)

This could probably be just a 10 line make file that you just make -f lldb/utils/xcode.mk. Not sure if you guys are a fan of this method, but we tend to find it to be much more manageable than custom python scripts.

lldb-build:
    cmake -E make_directory lldb-build
lldb-build/lldb.xcodeproj: llvm-build/build.ninja
     cmake -GXcode -Slldb -Blldb-build -C cmake/caches/Apple-lldb-Xcode.cmake 
 llvm-build:
     make -E make_directory llvm-build 
 llvm-build/build.ninja: llvm-build
     cmake -GNinja -Sllvm -Bllvm-build -DLLVM_ENABLE_PROJECTS='clang;libcxx;libcxxabi'
jasonmolenda accepted this revision.Jul 22 2019, 2:04 PM

LGTM. scripts/sort-pbxproj.rb can go too.

This revision is now accepted and ready to land.Jul 22 2019, 2:04 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2019, 2:20 PM

Seriously, discussion for changes like this should be open for more than 1h15min! I am in favor of the change in principle, but there's a number of things that have been rushed over here, e.g.:

cmake/XcodeHeaderGenerator/CMakeLists.txt
scripts/finish-swig-wrapper-classes.sh
scripts/Xcode/build-llvm.py
scripts/Xcode/lldbbuild.py
scripts/Xcode/package-clang-resource-headers.py
scripts/Xcode/prepare-gtest-run-dir.sh
scripts/Xcode/repo.py
scripts/Xcode/repos/FALLBACK
scripts/Xcode/repos/svn-trunk.json

[lldb] Remove Xcode project legacy: https://reviews.llvm.org/D65155

Seriously, discussion for changes like this should be open for more than 1h15min!

We discussed this and came to an agreement only a few hours before in the team meeting, which you were part of. As far as we know, Greg was the only user of the Xcode project outside of Apple, and he gave the thumbs up.

ormris removed a subscriber: ormris.Jul 23 2019, 10:53 AM

Seriously, discussion for changes like this should be open for more than 1h15min! I am in favor of the change in principle, but there's a number of things that have been rushed over here,

My two cents: altho this went through really fast, the only remaining users of the Xcode project file were JimI and myself. Greg Clayton got tired of having to update it (or waiting for Jim or I to update it) a while ago. And it hasn't been buildable for over a week now - neither Jim nor I had updated it to process the CommandOptions tablegen .td file since that was added. I don't think removing it was especially controversial - but good point on the ancillary files that needed to also be cleaned up.

We discussed this and came to an agreement only a few hours before in the team meeting

After all, LLVM is open-source and has a community. Making preemptive decisions in internal team meetings sounds concerning.

As far as we know, Greg was the only user of the Xcode project outside of Apple, and he gave the thumbs up.

I was a user of the Xcode project before Apple.

I don't think removing it was especially controversial

That's right. And still, it would be appreciated to give folks in other time zones at least a chance to take part. Thks

jingham added a comment.EditedJul 24 2019, 10:09 AM

We discussed this and came to an agreement only a few hours before in the team meeting

After all, LLVM is open-source and has a community. Making preemptive decisions in internal team meetings sounds concerning.

As far as we know, Greg was the only user of the Xcode project outside of Apple, and he gave the thumbs up.

I was a user of the Xcode project before Apple.

I don't think removing it was especially controversial

That's right. And still, it would be appreciated to give folks in other time zones at least a chance to take part. Thks

To be fair, I think we would have taken more time to discuss this if it weren't for the fact that Raphael's tablegen'ifying of command options had broken the current Xcode project in a way that was not straightforward to fix.

lldb/trunk/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme