Skip to content

package(autoconf): De-duplicate LDFLAGS#6321

Merged
waruqi merged 1 commit intoxmake-io:devfrom
Doekin:autoconf-ld
Apr 14, 2025
Merged

package(autoconf): De-duplicate LDFLAGS#6321
waruqi merged 1 commit intoxmake-io:devfrom
Doekin:autoconf-ld

Conversation

@Doekin
Copy link
Contributor

@Doekin Doekin commented Apr 14, 2025

This PR aims to eliminate duplicate linker flags that appear after merging ldflags and shflags. This adjustment resolves the issue where icu4c fails to build for Android in Git Bash on Windows due to redundant flags.

if ldflags or shflags then
-- autoconf does not use SHFLAGS
envs.LDFLAGS = table.concat(_translate_paths(table.join(ldflags or {}, shflags)), ' ')
envs.LDFLAGS = table.concat(table.unique(_translate_paths(table.join(ldflags or {}, shflags))), ' ')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use reverse_unique to reserve link flags orders.

@waruqi waruqi added this to the v3.0.0 milestone Apr 14, 2025
@waruqi waruqi merged commit 13144a7 into xmake-io:dev Apr 14, 2025
22 checks passed
@Doekin Doekin deleted the autoconf-ld branch May 16, 2025 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants