Skip to content

Commit

Permalink
Workaround lack of dead code elimination
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Nov 26, 2024
1 parent 276a115 commit af80068
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CLI/.sun
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
+*.cpp
name soup
require ../soup

arg -ffunction-sections
arg -fdata-sections
2 changes: 1 addition & 1 deletion build_common.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
// Config
$clang = $argv[1] ?? "clang";
$clang .= " -std=c++17 -fno-rtti -O3";
$clang .= " -std=c++17 -fno-rtti -O3 -ffunction-sections -fdata-sections";
if (defined("PHP_WINDOWS_VERSION_MAJOR"))
{
$clang .= " -D_CRT_SECURE_NO_WARNINGS";
Expand Down
3 changes: 3 additions & 0 deletions soup/.sun
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ arg -O3
if not windows
arg -fPIC
endif

arg -ffunction-sections
arg -fdata-sections

0 comments on commit af80068

Please sign in to comment.