<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - init_priority breaks compilation of pmr::memory_resource with GCC on OS X"
href="https://bugs.llvm.org/show_bug.cgi?id=38160">38160</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>init_priority breaks compilation of pmr::memory_resource with GCC on OS X
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ldionne@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>GCC on OSX can't compile pmr::memory_resource:
# On OS X, with a Homebrew-installed GCC
CXX_COMPILER="/usr/local/Cellar/gcc/8.1.0/bin/g++-8"
C_COMPILER="/usr/local/Cellar/gcc/8.1.0/bin/gcc-8"
cd root-of-llvm-monorepo
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=${CXX_COMPILER}
-DCMAKE_C_COMPILER=${C_COMPILER}
-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"
cmake --build . --target cxx_experimental
This produces:
/Users/ldionne/work/llvm/libcxx/src/experimental/memory_resource.cpp:76:65:
error: 'init_priority' attribute is not supported on this platform
ResourceInitHelper res_init __attribute__((init_priority (101)));
^
ninja: build stopped: subcommand failed.
The problem seems to be that `init_priority` is not an attribute supported by
GCC on OS X. Is there any way we can use something else when for GCC on OSX?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>