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

Chore: Workaround for llvm issue 56357 #28

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
- { os: ubuntu-22.04, env: { CC: gcc-12, CXX: g++-12 }, build_type: Release, extra_opts: '' }
# https://github.com/llvm/llvm-project/issues/56357
# On Ubuntu 22 affects clang versions prior to 15 (file entry.cpp)
- { os: ubuntu-22.04, env: { CC: clang-14, CXX: clang++-14 }, build_type: Release, extra_opts: '' }
- { os: ubuntu-22.04, env: { CC: clang-15, CXX: clang++-15 }, build_type: Release, extra_opts: '' }

# We are running two configurations:
Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,22 @@ if (${PATCH_FOLLY})
endif(PATCH_FOLLY_RES EQUAL 0)
endif(${PATCH_FOLLY})

# We could use feature macro __cpp_lib_char8_t but some compilers provide char8_t support
# but have related bugs (for exmple clang++ 14 fails to link std::u8string(reinterpret_cast<char8_t const*>("test"), 4))
# https://github.com/llvm/llvm-project/issues/56357
check_cxx_source_compiles(
"#include <filesystem>

inline std::u8string string_to_u8string(std::string const& in)
{
return std::u8string(reinterpret_cast<char8_t const*>(in.data()), in.size());
}

std::u8string u8name() { return string_to_u8string(std::string(\"test\")); }

int main() {
std::filesystem::path p = \"\";
std::u8string s;
std::u8string s = u8name();
p = p / s;
return 0;
}"
Expand Down
Loading