Skip to content

Commit

Permalink
Makefile: Adjust compiler flags specifically for cosmoc++
Browse files Browse the repository at this point in the history
Disable flto

Disable flto
  • Loading branch information
eric15342335 committed Jun 8, 2024
1 parent 4dc2a80 commit 6adc020
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ endif

# Security flags for Linux
ifeq ($(shell uname),Linux)
ifneq ($(CXX),cosmoc++)
CXXFLAGS += -z noexecstack -z relro -z now
endif
endif

# Shhh clang++
ifeq ($(CXX),clang++)
Expand Down Expand Up @@ -151,12 +153,14 @@ check:
--fix-errors --fix-notes --format-style=file -- -Iinclude

ifeq ($(MAKECMDGOALS),release)
ifneq ($(CXX),cosmoc++)
ifneq ($(CXX),clang++)
CXXFLAGS += -flto
else ifneq ($(OS),Windows_NT)
CXXFLAGS += -flto
endif
endif
endif

release: clean
# this should put after default target
Expand Down

0 comments on commit 6adc020

Please sign in to comment.