[cfe-dev] Problem with building Clang and LLVM using Xcode

Firouzeh Soleymani via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 21 17:40:38 PST 2017


Don, I got it to debug.  I set the breakpoint at
clang/lib/Driver/Driver.cpp and this time it worked.  Please disregard
my previous email.  Thank you so much for you help!

Firouzeh


On Tue, Nov 21, 2017 at 1:13 PM, Firouzeh Soleymani
<firouzeh at soleymanimagham.net> wrote:
> Don, I edited .xschema and it worked fine, thanks!  I added the driver
> code (clang/tools/driver/driver.cpp) to start debugging and set a
> breakpoint on main, but the program didn't stop at the breakpoint.  Do
> you know what else I need to do to debug?  Thanks!
>
> Firouzeh
>
>
> On Mon, Nov 20, 2017 at 3:44 AM, Don Hinton <hintonda at gmail.com> wrote:
>> Just edit the text file — it’s nothing magic.
>>
>> On Mon, Nov 20, 2017 at 12:54 AM Firouzeh Soleymani
>> <firouzeh at soleymanimagham.net> wrote:
>>>
>>> I tried what you said.  I could run clangd in Xcode, but as you
>>> mentioned it's not possible to choose clang to run.  It seems that
>>> Xcode doesn't see "clang-6.0" as an executable file.  It assumes that
>>> ".0" at the end of the filename is the extension, so it is a
>>> non-executable file.  I removed ".0" from the name, then I could run
>>> it.  I don't know if this will cause problems along the way.  I
>>> haven't started to debug clang yet, but if I run into problems, I'll
>>> report it here.  Thanks!
>>>
>>> Firouzeh
>>>
>>>
>>> On Sun, Nov 19, 2017 at 2:50 PM, Don Hinton <hintonda at gmail.com> wrote:
>>> > I don't normally use Xcode -- prefer command line -- but thought this
>>> > was
>>> > interesting so I looked into it.
>>> >
>>> > Not sure what the problem is with polly, but instead generating for
>>> > xcode,
>>> > try creating an External Build System project instead and point it to
>>> > your
>>> > ninja or make build.
>>> >
>>> > You can follow these instructions, but note that I was unable to select
>>> > clang in step 3, so I selected opt, then hand edited the
>>> > <project>.xschema
>>> > file to use clang instead.
>>> >
>>> >   https://forums.developer.apple.com/thread/65025
>>> >
>>> > hth...
>>> > don
>>> >
>>> >
>>> > On Sat, Nov 18, 2017 at 9:35 AM, Firouzeh Soleymani via cfe-dev
>>> > <cfe-dev at lists.llvm.org> wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> I'm trying to build clang and llvm using Xcode.  I used the following
>>> >> command to generate the Xcode project:
>>> >>
>>> >> cmake -G Xcode -DDCMAKE_INSTALL_PREFIX="path to my llvm install
>>> >> directory" "path to my llvm directory"
>>> >>
>>> >> Then I opened LLVM.xcodeproj in Xcode, and chose "clang" as the only
>>> >> build scheme and hit the Build.  I ran into this error:
>>> >> clang: error: no such file or directory: 'path to my build
>>> >> directory/lib/Debug/libPolly.a'.
>>> >>
>>> >> /lib/Debug contains only one file - 'libPollyISL.a'.  I got the same
>>> >> error when I tried building from the command line:
>>> >> clang: error: no such file or directory: 'my build
>>> >> directory/lib/Debug/libPolly.a'
>>> >> The following build commands failed: Ld
>>> >> /Users/Firouzeh/dev/llvmbuild/Debug/bin/opt normal x86_64
>>> >>
>>> >> I'm trying Xcode build, because I want to debug clang in Xcode.  I'd
>>> >> appreciate any help!
>>> >>
>>> >> I'm using macOS 10.13.1, Xcode 9.1, Apple LLVM version 9.0.0
>>> >> (clang-900.0.38), and trunk revision 318585 of the source code.
>>> >>
>>> >> Thanks!
>>> >> Firouzeh Soleymani
>>> >> _______________________________________________
>>> >> cfe-dev mailing list
>>> >> cfe-dev at lists.llvm.org
>>> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>> >
>>> >


More information about the cfe-dev mailing list