Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move __allocator under PAL_STDCPP_COMPAT #34141

Merged
merged 1 commit into from
Mar 26, 2020
Merged

Move __allocator under PAL_STDCPP_COMPAT #34141

merged 1 commit into from
Mar 26, 2020

Conversation

am11
Copy link
Member

@am11 am11 commented Mar 26, 2020

Fixes CoreCLR build on Android device with Clang 9.0.1.

make[2]: Entering directory '/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'
make[2]: Leaving directory '/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'
In file included from /data/data/com.termux/files/home/runtime/src/coreclr/src/debug/dbgutil/elfreader.cpp:11:
In file included from /data/data/com.termux/files/home/runtime/src/coreclr/src/debug/dbgutil/elfreader.h:9:
In file included from /data/data/com.termux/files/usr/bin/../include/c++/v1/string:505:
In file included from /data/data/com.termux/files/usr/bin/../include/c++/v1/string_view:176:
In file included from /data/data/com.termux/files/usr/bin/../include/c++/v1/__string:57:
In file included from /data/data/com.termux/files/usr/bin/../include/c++/v1/algorithm:645:
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1493:31: error: expected member name or ';' after declaration specifiers
    const _Alloc& __allocator() const { return __f_.second(); }
    ~~~~~~~~~~~~              ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1615:29: error: expected unqualified-id
    _Ap __a(__f_.__allocator());
                            ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1626:57: error: expected unqualified-id
    ::new (__p) __func(__f_.__target(), __f_.__allocator());
                                                        ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1642:29: error: expected unqualified-id
    _Ap __a(__f_.__allocator());
                            ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1928:39: error: expected unqualified-id
        _FunAlloc __a(__f->__allocator());
                                      ^
make[2]: Entering directory '/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'
make[2]: Entering directory '/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'

This was also fixed in LLVM repo: https://reviews.llvm.org/D57355.

@am11
Copy link
Member Author

am11 commented Mar 26, 2020

Failures seem unrelated:

@am11 am11 marked this pull request as ready for review March 26, 2020 23:07
@am11
Copy link
Member Author

am11 commented Mar 26, 2020

Since the stacktraces are similar, this will hopefully also fix the macOS flakiness reported in dotnet/source-build#1449.

cc @crummel, @janvorli

@jkotas jkotas merged commit 312cb59 into dotnet:master Mar 26, 2020
@am11 am11 deleted the feature/stdcpp-compat branch March 26, 2020 23:17
WardenGnaw added a commit to WardenGnaw/coreclr that referenced this pull request Apr 22, 2020
Fixes CoreCLR build on Android device with Clang 9.0.1.

make[2]: Entering directory
'/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'
make[2]: Leaving directory
'/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'
In file included from
/data/data/com.termux/files/home/runtime/src/coreclr/src/debug/dbgutil/elfreader.cpp:11:
In file included from
/data/data/com.termux/files/home/runtime/src/coreclr/src/debug/dbgutil/elfreader.h:9:
In file included from
/data/data/com.termux/files/usr/bin/../include/c++/v1/string:505:
In file included from
/data/data/com.termux/files/usr/bin/../include/c++/v1/string_view:176:
In file included from
/data/data/com.termux/files/usr/bin/../include/c++/v1/__string:57:
In file included from
/data/data/com.termux/files/usr/bin/../include/c++/v1/algorithm:645:
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1493:31:
error: expected member name or ';' after declaration specifiers
    const _Alloc& __allocator() const { return __f_.second(); }
    ~~~~~~~~~~~~              ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1615:29:
error: expected unqualified-id
    _Ap __a(__f_.__allocator());
                            ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1626:57:
error: expected unqualified-id
    ::new (__p) __func(__f_.__target(), __f_.__allocator());
                                                        ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1642:29:
error: expected unqualified-id
    _Ap __a(__f_.__allocator());
                            ^
/data/data/com.termux/files/usr/bin/../include/c++/v1/functional:1928:39:
error: expected unqualified-id
        _FunAlloc __a(__f->__allocator());
                                      ^
make[2]: Entering directory
'/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'
make[2]: Entering directory
'/data/data/com.termux/files/home/runtime/artifacts/obj/coreclr/Linux.x64.Debug'

This was also fixed in LLVM repo: https://reviews.llvm.org/D57355.

From dotnet/runtime#34141
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants