-
Notifications
You must be signed in to change notification settings - Fork 52
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
Optimize liblzma.a
build
#107
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
…iblzma.a` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
The CI seems to be broken by new feature
This is probably an upstream bug, since #ifdef HAVE_SMALL
extern uint32_t lzma_crc32_table[1][256];
extern void lzma_crc32_init(void);
#else
extern const uint32_t lzma_crc32_table[8][256];
extern const uint64_t lzma_crc64_table[4][256];
#endif |
I think upgrading xz to latest v5.4.1 might fix this. |
I think #108 might fix the error in this PR, so I would retry after that PR is merged. |
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@@ -74,6 +74,27 @@ fn main() { | |||
} | |||
} | |||
|
|||
build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be gates behind OPT_LEVEL
. Only after OPT_LEVEL = Some("3")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to this MR by name.... xz2
should also define NDEBUG
when OPT_LEVEL
is 3
https://github.com/xz-mirror/xz/blob/b69da6d4bb6bb11fc0cf066920791990d2b22a06/dos/config.h#L136
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to this MR by name.... xz2 should also define NDEBUG when OPT_LEVEL is 3
I've added #define NDEBUG 1
to config.h
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be gates behind
OPT_LEVEL
. Only afterOPT_LEVEL = Some("3")
?
I'm not sure which line are you referring to.
The line you referenced does not contain anything related to opt-level or optimization flags.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
liblzma.a
size by using--gc-sections
fat-lto
andthin-lto
to turn out fat and thin lto for buildingliblzma.a
thin
to optimize for size using macroHAVE_SMALL
Signed-off-by: Jiahao XU Jiahao_XU@outlook.com