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

Enable interprocedural optimization #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.9)
cmake_policy(SET CMP0069 NEW)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)

set(H3_PREFIX "" CACHE STRING "Prefix for exported symbols")

Expand Down Expand Up @@ -56,8 +58,8 @@ set(H3_SOVERSION 1)

project(h3 LANGUAGES C VERSION ${H3_VERSION})

set(H3_COMPILE_FLAGS "")
set(H3_LINK_FLAGS "")
set(H3_COMPILE_FLAGS "-O1" "-finline-small-functions" "-finline-functions")
set(H3_LINK_FLAGS "-Wl,-Bsymbolic-functions" "-Wl,-z,relro")
if(NOT WIN32)
# Compiler options are set only on non-Windows, since these options
# are not correct for MSVC.
Expand Down