<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/Driver/darwin-stdlib.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[clang] Clean up macOS version flags (#95374)</title>
<updated>2024-06-16T10:25:25+00:00</updated>
<author>
<name>Gábor Horváth</name>
<email>xazax.hun@gmail.com</email>
</author>
<published>2024-06-16T10:25:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=edabb5c12ed9312c3366286a69e881f625102a85'/>
<id>edabb5c12ed9312c3366286a69e881f625102a85</id>
<content type='text'>
The -mmacos-version-min flag is preferred over -mmacosx-version-min.
This patch updates the tests and documentation to make this clear and
also adds the missing logic to scan build to handle the new flag.

Fixes #86376.

Co-authored-by: Gabor Horvath &lt;gaborh@apple.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The -mmacos-version-min flag is preferred over -mmacosx-version-min.
This patch updates the tests and documentation to make this clear and
also adds the missing logic to scan build to handle the new flag.

Fixes #86376.

Co-authored-by: Gabor Horvath &lt;gaborh@apple.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Re-apply change to avoid passing -stdlib=libc++ spuriously to CC1 on Darwin</title>
<updated>2022-12-21T00:56:28+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2022-12-20T23:04:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=52aab0e4b4a5d6728f4bb9c7b3340133f585fc15'/>
<id>52aab0e4b4a5d6728f4bb9c7b3340133f585fc15</id>
<content type='text'>
Previously, we would be passing down -stdlib=libc++ from the Driver
to CC1 whenever the default standard library on the platform was libc++,
even if -stdlib= had not been passed to the Driver. This meant that we
would pass -stdlib=libc++ in nonsensical circumstances, such as when
compiling C code.

This logic had been added in b534ce46bd40 to make sure that header
search paths were set up properly. However, since libc++ is now the
default Standard Library on Darwin, passing this explicitly is not
required anymore. Indeed, if no -stdlib= is specified, CC1 will end
up using libc++ if it queries which standard library to use, without
having to be told.

Not passing -stdlib= at all to CC1 on Darwin should become possible
once CC1 stops relying on it to set up framework search paths.

Furthermore, this commit also removes a diagnostic checking whether the
deployment target is too old to support libc++. Nowadays, all supported
deployment targets use libc++ and compiling with libstdc++ is not
supported anymore. The Driver was the wrong place to issue this
diagnostic since it doesn't know whether libc++ will actually be linked
against (e.g. C vs C++), which would lead to spurious diagnostics.
Given that these targets are not supported anymore, we simply drop
the diagnostic instead of trying to refactor it into CC1.

This is a re-application of 6540f32db09c which had been reverted in
49dd02bd0819 because it broke a compiler-rt test. The test had broken
because we were compiling C code and passing -stdlib=libc++, which Clang
will now warn about.

rdar://103198514

Differential Revision: https://reviews.llvm.org/D139938
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we would be passing down -stdlib=libc++ from the Driver
to CC1 whenever the default standard library on the platform was libc++,
even if -stdlib= had not been passed to the Driver. This meant that we
would pass -stdlib=libc++ in nonsensical circumstances, such as when
compiling C code.

This logic had been added in b534ce46bd40 to make sure that header
search paths were set up properly. However, since libc++ is now the
default Standard Library on Darwin, passing this explicitly is not
required anymore. Indeed, if no -stdlib= is specified, CC1 will end
up using libc++ if it queries which standard library to use, without
having to be told.

Not passing -stdlib= at all to CC1 on Darwin should become possible
once CC1 stops relying on it to set up framework search paths.

Furthermore, this commit also removes a diagnostic checking whether the
deployment target is too old to support libc++. Nowadays, all supported
deployment targets use libc++ and compiling with libstdc++ is not
supported anymore. The Driver was the wrong place to issue this
diagnostic since it doesn't know whether libc++ will actually be linked
against (e.g. C vs C++), which would lead to spurious diagnostics.
Given that these targets are not supported anymore, we simply drop
the diagnostic instead of trying to refactor it into CC1.

This is a re-application of 6540f32db09c which had been reverted in
49dd02bd0819 because it broke a compiler-rt test. The test had broken
because we were compiling C code and passing -stdlib=libc++, which Clang
will now warn about.

rdar://103198514

Differential Revision: https://reviews.llvm.org/D139938
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang] Don't spuriously pass -stdlib=libc++ to CC1 on Darwin"</title>
<updated>2022-12-20T16:45:07+00:00</updated>
<author>
<name>Hans Wennborg</name>
<email>hans@chromium.org</email>
</author>
<published>2022-12-20T16:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=49dd02bd081901db6011bdbe676573bfd5482627'/>
<id>49dd02bd081901db6011bdbe676573bfd5482627</id>
<content type='text'>
This broke the instrprof-darwin-exports.c test on mac, see e.g.
https://green.lab.llvm.org/green/job/clang-stage1-RA/32351/

&gt; Previously, we would be passing down -stdlib=libc++ from the Driver
&gt; to CC1 whenever the default standard library on the platform was libc++,
&gt; even if -stdlib= had not been passed to the Driver. This meant that we
&gt; would pass -stdlib=libc++ in nonsensical circumstances, such as when
&gt; compiling C code.
&gt;
&gt; This logic had been added in b534ce46bd40 to make sure that header
&gt; search paths were set up properly. However, since libc++ is now the
&gt; default Standard Library on Darwin, passing this explicitly is not
&gt; required anymore. Indeed, if no -stdlib= is specified, CC1 will end
&gt; up using libc++ if it queries which standard library to use, without
&gt; having to be told.
&gt;
&gt; Not passing -stdlib= at all to CC1 on Darwin should become possible
&gt; once CC1 stops relying on it to set up framework search paths.
&gt;
&gt; Furthermore, this commit also removes a diagnostic checking whether the
&gt; deployment target is too old to support libc++. Nowadays, all supported
&gt; deployment targets use libc++ and compiling with libstdc++ is not
&gt; supported anymore. The Driver was the wrong place to issue this
&gt; diagnostic since it doesn't know whether libc++ will actually be linked
&gt; against (e.g. C vs C++), which would lead to spurious diagnostics.
&gt; Given that these targets are not supported anymore, we simply drop
&gt; the diagnostic instead of trying to refactor it into CC1.
&gt;
&gt; rdar://103198514
&gt;
&gt; Differential Revision: https://reviews.llvm.org/D139938

This reverts commit 6540f32db09cf6b367812642fbd91d44cbb6638d.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This broke the instrprof-darwin-exports.c test on mac, see e.g.
https://green.lab.llvm.org/green/job/clang-stage1-RA/32351/

&gt; Previously, we would be passing down -stdlib=libc++ from the Driver
&gt; to CC1 whenever the default standard library on the platform was libc++,
&gt; even if -stdlib= had not been passed to the Driver. This meant that we
&gt; would pass -stdlib=libc++ in nonsensical circumstances, such as when
&gt; compiling C code.
&gt;
&gt; This logic had been added in b534ce46bd40 to make sure that header
&gt; search paths were set up properly. However, since libc++ is now the
&gt; default Standard Library on Darwin, passing this explicitly is not
&gt; required anymore. Indeed, if no -stdlib= is specified, CC1 will end
&gt; up using libc++ if it queries which standard library to use, without
&gt; having to be told.
&gt;
&gt; Not passing -stdlib= at all to CC1 on Darwin should become possible
&gt; once CC1 stops relying on it to set up framework search paths.
&gt;
&gt; Furthermore, this commit also removes a diagnostic checking whether the
&gt; deployment target is too old to support libc++. Nowadays, all supported
&gt; deployment targets use libc++ and compiling with libstdc++ is not
&gt; supported anymore. The Driver was the wrong place to issue this
&gt; diagnostic since it doesn't know whether libc++ will actually be linked
&gt; against (e.g. C vs C++), which would lead to spurious diagnostics.
&gt; Given that these targets are not supported anymore, we simply drop
&gt; the diagnostic instead of trying to refactor it into CC1.
&gt;
&gt; rdar://103198514
&gt;
&gt; Differential Revision: https://reviews.llvm.org/D139938

This reverts commit 6540f32db09cf6b367812642fbd91d44cbb6638d.
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Don't spuriously pass -stdlib=libc++ to CC1 on Darwin</title>
<updated>2022-12-19T21:11:39+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2022-12-13T15:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6540f32db09cf6b367812642fbd91d44cbb6638d'/>
<id>6540f32db09cf6b367812642fbd91d44cbb6638d</id>
<content type='text'>
Previously, we would be passing down -stdlib=libc++ from the Driver
to CC1 whenever the default standard library on the platform was libc++,
even if -stdlib= had not been passed to the Driver. This meant that we
would pass -stdlib=libc++ in nonsensical circumstances, such as when
compiling C code.

This logic had been added in b534ce46bd40 to make sure that header
search paths were set up properly. However, since libc++ is now the
default Standard Library on Darwin, passing this explicitly is not
required anymore. Indeed, if no -stdlib= is specified, CC1 will end
up using libc++ if it queries which standard library to use, without
having to be told.

Not passing -stdlib= at all to CC1 on Darwin should become possible
once CC1 stops relying on it to set up framework search paths.

Furthermore, this commit also removes a diagnostic checking whether the
deployment target is too old to support libc++. Nowadays, all supported
deployment targets use libc++ and compiling with libstdc++ is not
supported anymore. The Driver was the wrong place to issue this
diagnostic since it doesn't know whether libc++ will actually be linked
against (e.g. C vs C++), which would lead to spurious diagnostics.
Given that these targets are not supported anymore, we simply drop
the diagnostic instead of trying to refactor it into CC1.

rdar://103198514

Differential Revision: https://reviews.llvm.org/D139938
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, we would be passing down -stdlib=libc++ from the Driver
to CC1 whenever the default standard library on the platform was libc++,
even if -stdlib= had not been passed to the Driver. This meant that we
would pass -stdlib=libc++ in nonsensical circumstances, such as when
compiling C code.

This logic had been added in b534ce46bd40 to make sure that header
search paths were set up properly. However, since libc++ is now the
default Standard Library on Darwin, passing this explicitly is not
required anymore. Indeed, if no -stdlib= is specified, CC1 will end
up using libc++ if it queries which standard library to use, without
having to be told.

Not passing -stdlib= at all to CC1 on Darwin should become possible
once CC1 stops relying on it to set up framework search paths.

Furthermore, this commit also removes a diagnostic checking whether the
deployment target is too old to support libc++. Nowadays, all supported
deployment targets use libc++ and compiling with libstdc++ is not
supported anymore. The Driver was the wrong place to issue this
diagnostic since it doesn't know whether libc++ will actually be linked
against (e.g. C vs C++), which would lead to spurious diagnostics.
Given that these targets are not supported anymore, we simply drop
the diagnostic instead of trying to refactor it into CC1.

rdar://103198514

Differential Revision: https://reviews.llvm.org/D139938
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++"</title>
<updated>2022-08-16T13:27:18+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2022-08-05T17:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=65d83ba34378b8e740c5203fe46a9c50d2aeb862'/>
<id>65d83ba34378b8e740c5203fe46a9c50d2aeb862</id>
<content type='text'>
Newer SDKs don't even provide libstdc++ headers, so it's effectively
never valid to build for libstdc++ unless the user explicitly asks
for it (in which case they will need to provide include paths and more).

This is a re-application of c5ccb78ade81 which had been reverted in
33171df9cc7f because it broke the Fuchsia CI bots. The issue was that
the test was XPASSing because it didn't fail anymore when the
CLANG_DEFAULT_CXX_LIB was set to libc++, which seems to be done for
Fuchsia. Instead, the test only fails if CLANG_DEFAULT_CXX_LIB is
set to libstdc++.

As a fly-by fix, also adjust the triple used by various tests to
something that is supported. Those tests were shown to fail on
internal bots.

Differential Revision: https://reviews.llvm.org/D131274
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Newer SDKs don't even provide libstdc++ headers, so it's effectively
never valid to build for libstdc++ unless the user explicitly asks
for it (in which case they will need to provide include paths and more).

This is a re-application of c5ccb78ade81 which had been reverted in
33171df9cc7f because it broke the Fuchsia CI bots. The issue was that
the test was XPASSing because it didn't fail anymore when the
CLANG_DEFAULT_CXX_LIB was set to libc++, which seems to be done for
Fuchsia. Instead, the test only fails if CLANG_DEFAULT_CXX_LIB is
set to libstdc++.

As a fly-by fix, also adjust the triple used by various tests to
something that is supported. Those tests were shown to fail on
internal bots.

Differential Revision: https://reviews.llvm.org/D131274
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[clang][Darwin] Always set the default C++ Standard Library to libc++"</title>
<updated>2022-08-04T22:56:32+00:00</updated>
<author>
<name>Leonard Chan</name>
<email>leonardchan@google.com</email>
</author>
<published>2022-08-04T22:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=33171df9cc7f6560dea7b0b162ab51ff97417468'/>
<id>33171df9cc7f6560dea7b0b162ab51ff97417468</id>
<content type='text'>
This reverts commit c5ccb78ade8136134e0ca9dde64de97f913f0f8c.

We're seeing darwin-stdlib.cpp fail on our linux, mac, and windows
builders:
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8806821020552676065/overview
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit c5ccb78ade8136134e0ca9dde64de97f913f0f8c.

We're seeing darwin-stdlib.cpp fail on our linux, mac, and windows
builders:
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8806821020552676065/overview
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Darwin] Always set the default C++ Standard Library to libc++</title>
<updated>2022-08-03T19:40:27+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2022-08-03T18:20:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c5ccb78ade8136134e0ca9dde64de97f913f0f8c'/>
<id>c5ccb78ade8136134e0ca9dde64de97f913f0f8c</id>
<content type='text'>
Newer SDKs don't even provide libstdc++ headers, so it's effectively
never valid to build for libstdc++ unless the user explicitly asks
for it (in which case they will need to provide include paths and more).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Newer SDKs don't even provide libstdc++ headers, so it's effectively
never valid to build for libstdc++ unless the user explicitly asks
for it (in which case they will need to provide include paths and more).
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Darwin] Refactor header search path logic into the driver</title>
<updated>2019-05-21T17:48:04+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne@apple.com</email>
</author>
<published>2019-05-21T17:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e97b5f5cf37e382643b567affd714823215d0e75'/>
<id>e97b5f5cf37e382643b567affd714823215d0e75</id>
<content type='text'>
Summary:
This commit moves the logic for determining system, resource and C++
header search paths from CC1 to the driver. This refactor has already
been made for several platforms, but Darwin had been left behind.

This refactor tries to implement the previous search path logic with
perfect accuracy. In particular, the order of all include paths inside
CC1 and all paths that were skipped because nonexistent are conserved
after the refactor. This change was also tested against a code base
of significant size and revealed no problems.

Reviewers: jfb, arphaman

Subscribers: nemanjai, javed.absar, kbarton, christof, jkorous, dexonsmith, jsji, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61963

llvm-svn: 361278
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This commit moves the logic for determining system, resource and C++
header search paths from CC1 to the driver. This refactor has already
been made for several platforms, but Darwin had been left behind.

This refactor tries to implement the previous search path logic with
perfect accuracy. In particular, the order of all include paths inside
CC1 and all paths that were skipped because nonexistent are conserved
after the refactor. This change was also tested against a code base
of significant size and revealed no problems.

Reviewers: jfb, arphaman

Subscribers: nemanjai, javed.absar, kbarton, christof, jkorous, dexonsmith, jsji, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61963

llvm-svn: 361278
</pre>
</div>
</content>
</entry>
<entry>
<title>[Driver] Fix libcxx detection on Darwin with clang run as ./clang</title>
<updated>2019-01-09T13:08:11+00:00</updated>
<author>
<name>Ilya Biryukov</name>
<email>ibiryukov@google.com</email>
</author>
<published>2019-01-09T13:08:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=87aaa56b426bd22c3633679115dc29ca042d4fff'/>
<id>87aaa56b426bd22c3633679115dc29ca042d4fff</id>
<content type='text'>
Summary:
By using '..' instead of fs::parent_path.

The intention of the code was to go from 'path/to/clang/bin' to
'path/to/clang/include'. In most cases parent_path works, however it
would fail when clang is run as './clang'.

This was noticed in Chromium's bug tracker, see
https://bugs.chromium.org/p/chromium/issues/detail?id=919761

Reviewers: arphaman, thakis, EricWF

Reviewed By: arphaman, thakis

Subscribers: christof, cfe-commits

Differential Revision: https://reviews.llvm.org/D56446

llvm-svn: 350714
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
By using '..' instead of fs::parent_path.

The intention of the code was to go from 'path/to/clang/bin' to
'path/to/clang/include'. In most cases parent_path works, however it
would fail when clang is run as './clang'.

This was noticed in Chromium's bug tracker, see
https://bugs.chromium.org/p/chromium/issues/detail?id=919761

Reviewers: arphaman, thakis, EricWF

Reviewed By: arphaman, thakis

Subscribers: christof, cfe-commits

Differential Revision: https://reviews.llvm.org/D56446

llvm-svn: 350714
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix test change from r348365 to deal with Windows paths correctly.</title>
<updated>2018-12-05T23:10:14+00:00</updated>
<author>
<name>Douglas Yung</name>
<email>douglas.yung@sony.com</email>
</author>
<published>2018-12-05T23:10:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=27d16370c3b020523657e3c3ae16afe59e389756'/>
<id>27d16370c3b020523657e3c3ae16afe59e389756</id>
<content type='text'>
llvm-svn: 348425
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 348425
</pre>
</div>
</content>
</entry>
</feed>
