mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
add -dead_strip_dylibs by default to the macOS linker
Under macOS, to reduce dependency chains, we remove functions and data that are unreachable by the entry point or exported symbols. In particular, the linker is run with "-dead_strip" and with "-dead_strip_dylibs".
This commit is contained in:
19
custom.c
19
custom.c
@@ -91,6 +91,16 @@ custom(char *name, int count, VALUE **vals)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* validate custtbl_allowed value
|
||||
*/
|
||||
if (custtbl_allowed == 0) {
|
||||
fprintf(stderr,
|
||||
"%sCalc was built with custom functions enabled but custtbl_allowed is 0\n",
|
||||
(conf->tab_ok ? "\t" : ""));
|
||||
return error_value(E_NO_CUSTOM);
|
||||
}
|
||||
|
||||
/*
|
||||
* no such custom function
|
||||
*/
|
||||
@@ -107,6 +117,15 @@ custom(char *name, int count, VALUE **vals)
|
||||
(conf->tab_ok ? "\t" : ""), name, count,
|
||||
(vals == NULL) ? "NULL" : "non-NULL");
|
||||
}
|
||||
|
||||
/*
|
||||
* validate custtbl_allowed value
|
||||
*/
|
||||
if (custtbl_allowed != 0) {
|
||||
fprintf(stderr,
|
||||
"%sCalc was built with custom functions disabled but custtbl_allowed is != 0\n",
|
||||
(conf->tab_ok ? "\t" : ""));
|
||||
}
|
||||
return error_value(E_NO_CUSTOM);
|
||||
|
||||
#endif /* CUSTOM */
|
||||
|
Reference in New Issue
Block a user