> On Dec 19, 2017, at 4:24 AM, Pavel Labath via lldb-dev 
> <lldb-dev@lists.llvm.org> wrote:
> 
> On 18 December 2017 at 23:51, Adrian Prantl <apra...@apple.com> wrote:
>> I also just hit this and apparently this is an intentional behavior of xcrun.
>> 
>> Note that this only affects systems that have the so-called command line 
>> tools installed (this is what you get when you install the command line 
>> tools without installing Xcode).
>> 
>> When the command line tools are installed *and* xcrun is run without 
>> explicitly asking for an sdk, it will add /usr/local/include to the search 
>> path instead of adding the -isysroot 
>> /Applications/Xcode.app/.../MacOSX10.13.sdk that we want here. This explains 
>> why Pavel's workaround works.
>> 
>> I'm not yet sure whether requiring the macosx SDK in this file is always the 
>> right thing to do here or if there is a better solution.
>> 
> 
> Setting SDKROOT=macosx is not ideal, but I think it should fine. This
> is building host code, so the only case where this would be wrong is
> if someone tried to run dotest on an iOS (WatchOS, ...) host, which I
> think you guys don't do.
> 
> TBH, I would even consider removing the "crash hook" altogether. Is
> anyone using this functionality on your side? The feature sounds like
> it would be useful in the old dotest days, when all tests were run
> sequentially in a single process, but now we run pretty much every
> test in it's own process, so it doesn't look like it should be a
> problem figuring out what the test was doing when it crashed.

The crash hook is needed since ReportCrash on MacOS knows how to dig up a crash 
log line for each shared library that is currently loaded in a process when it 
generates a crash report. There are settings that we can enable to enable 
allowing the expression that is being run to be logged:

(lldb) settings set target.display-expression-in-crashlogs 1

These crash hooks, if we are talking about the host level call that sets the 
crash log lines and not something else, have been invaluable over the years so 
I would venture to say we don't want to take them out. Not sure if any other 
system does anything with these. If Apple is the only one, we can conditionally 
compile them in only for Apple targets if needed and use macro to set them that 
does nothing on non Apple builds.

Greg

_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to