Page MenuHomePhabricator

[CMAKE] Fix static linkage when building for Windows
ClosedPublic

Authored by Fabien on Jan 19 2020, 10:45.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCb53c0fcaff0e: [CMAKE] Fix static linkage when building for Windows
Summary

The -static flag is obviously a linker flag and not a compilation
flag. It used to work due to the CMAKE_<C|CXX>_FLAGS being passed at
link time, hiding the initial issue. The bug is revealed by D4947: while
the cross build still succeed, it is no longer static.

Test Plan

Run the Gitian build for Windows. Run the bitcoin-qt.exe executable
and check it runs and does not complain about missing DLLs.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Jan 19 2020, 10:45
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 19 2020, 10:45
Fabien updated this revision to Diff 15669.Jan 19 2020, 12:30

Rebase on top of D5024 in order for the gitian build to succeed.

deadalnix accepted this revision.Jan 19 2020, 13:58
This revision is now accepted and ready to land.Jan 19 2020, 13:58
This revision was automatically updated to reflect the committed changes.