Skip to content

Commit

Permalink
Binary size flag patch (#2347)
Browse files Browse the repository at this point in the history
Summary:
From: D53950535

Need to remove -O2 flag for size optimization (otherwise we use both -O2 and -Os)

Pull Request resolved: #2347

Reviewed By: larryliu0820

Differential Revision: D54762602

Pulled By: lucylq

fbshipit-source-id: 62640116fd9fbff1900dcd6f08ccbebc334175cf
  • Loading branch information
lucylq authored and facebook-github-bot committed Mar 11, 2024
1 parent 6897964 commit caade55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ endif()
# data into sections so they can be properly gc'd. -s: strip symbol.
# -fno-exceptions -fno-rtti: disables exceptions and runtime type.
set(CMAKE_CXX_FLAGS_RELEASE
"-O2 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti")
"-ffunction-sections -fdata-sections -fno-exceptions -fno-rtti")
if(NOT APPLE)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
endif()
Expand Down

0 comments on commit caade55

Please sign in to comment.