HomePhabricator

[CMAKE] Fix static linkage when building for Windows

Description

[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.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5023

Details

Provenance
FabienAuthored on Jan 19 2020, 10:44
jasonbcoxPushed on Jan 19 2020, 19:32
Reviewer
Restricted Project
Differential Revision
D5023: [CMAKE] Fix static linkage when building for Windows
Parents
rSTAGING33f09e097bcc: Fix type mismatch for GetVirtualSizeWith<Descendants|Ancerstors>
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/15677