-
Notifications
You must be signed in to change notification settings - Fork 85
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
[HOLD] Move from GCC to Clang #1816
Conversation
Okay steps so far to get to where I'm at. on the vm in a random spot
add and right now its seems to fail on the linking and I'm stuck on compilation, the linker seems to not be working well with libc++ or importing it properly and it is returning
and such which is failing compilation |
Makefile
Outdated
@@ -23,16 +23,16 @@ PROJECT = $(shell git rev-parse --show-toplevel) | |||
INCLUDE = -I$(PROJECT) -I$(PROJECT)/mbedtls/include | |||
|
|||
# Set our standard C++ compiler flags | |||
CXXFLAGS = -g -std=c++20 -fPIC -DSQLITE_ENABLE_NORMALIZE $(BEDROCK_OPTIM_COMPILE_FLAG) -Wall -Werror -Wformat-security -Wno-error=deprecated-declarations $(INCLUDE) | |||
CXXFLAGS = -g -std=c++20 -gdwarf-4 -stdlib=libc++ -I/usr/include/c++/v1 -fPIC -DSQLITE_ENABLE_NORMALIZE $(BEDROCK_OPTIM_COMPILE_FLAG) -Wno-vla-cxx-extension -Wno-unqualified-std-cast-call -Werror -Wformat-security -Wno-error=deprecated-declarations $(INCLUDE) #-Wall -Werror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-gdwarf-4
is here because otherwise clang outputs newer dwarf formats (version 5) than gnu ld will understand. We should be able get rid of this if we use clang's lld
linker. For now, this outputs the older format.
This pcre problem is a real head-scratcher- pcre hasn't been maintained in awhile so pcre2 is the way to go, but we might need a wrapper to properly drop-in install it. |
It's used in only a few places. We could update code to use PCRE2 pretty easily, it's probably only a few lines. |
was trying to get gh actions working but llvm.sh is failing so will check on this later |
I think this has been abandoned. Should we close this PR? |
Details
Fixed Issues
Fixes GH_LINK
Tests
Internal Testing Reminder: when changing bedrock, please compile auth against your new changes