Skip to content

Commit

Permalink
Added missing -lc++ flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ruoka committed Jul 27, 2024
2 parents d6eba0f + bc6b153 commit 24ed9f8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ jobs:
with:
fetch-depth: 1
submodules: true
- name: Install Clang 15
run: |
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
brew install --force llvm
- name: make
run: make OS=Github
- name: make test
run: make test OS=Github
run: make
- name: make run_tests
run: make run_tests
32 changes: 13 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,24 @@ OS = $(shell uname -s)
endif

ifeq ($(OS),Linux)
CC = /usr/lib/llvm-18/bin/clang
CXX = /usr/lib/llvm-18/bin/clang++
CXXFLAGS = -pthread -I/usr/lib/llvm-18/include/c++/v1
LDFLAGS = -lc++ -L/usr/lib/llvm-18/lib/c++
CC := /usr/lib/llvm-18/bin/clang
CXX := /usr/lib/llvm-18/bin/clang++
CXXFLAGS = -pthread -I/usr/local/include
LDFLAGS = -L/usr/local/lib
CXXFLAGS += -std=c++23 -Wno-reserved-module-identifier
endif

ifeq ($(OS),Darwin)
CC = /opt/homebrew/opt/llvm/bin/clang
CXX = /opt/homebrew/opt/llvm/bin/clang++
CXXFLAGS =-I/opt/homebrew/opt/llvm/include/c++/v1 -Ofast
LDFLAGS = -L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++ -Ofast
CC := /Library/Developer/CommandLineTools/usr/bin/clang
CXX := /Library/Developer/CommandLineTools/usr/bin/clang++
CXXFLAGS = -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CXXFLAGS += -std=c++2b
endif

ifeq ($(OS),Github)
CC = /usr/local/opt/llvm/bin/clang
CXX = /usr/local/opt/llvm/bin/clang++
CXXFLAGS = -I/usr/local/opt/llvm/include/ -I/usr/local/opt/llvm/include/c++/v1
LDFLAGS = -L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++
endif

CXXFLAGS += -std=c++23 -stdlib=libc++
CXXFLAGS += -Wall -Wextra -Wno-reserved-module-identifier -Wno-deprecated-declarations
CXXFLAGS += -stdlib=libc++ -Wall -Wextra
CXXFLAGS += -Wno-deprecated-declarations
CXXFLAGS += -I$(sourcedir)
LDFLAGS += -fuse-ld=lld
LDFLAGS += -fuse-ld=lld -lc++

export CC
export CXX
Expand Down Expand Up @@ -182,4 +176,4 @@ mostlyclean:
.PHONY: dump
dump:
$(foreach v, $(sort $(.VARIABLES)), $(if $(filter file,$(origin $(v))), $(info $(v)=$($(v)))))
@echo ''
@echo ''

0 comments on commit 24ed9f8

Please sign in to comment.