Commit graph

21 commits

Author SHA1 Message Date
Hennadii Stepanov
6962c66b4a
build, msvc: Do not compile redundant sources
The `test\util\setup_common.cpp` and `wallet\test\util.cpp` sources are
already compiled and included in the `libtest_util` library, which is
linked to the `test_bitcoin-qt.exe` binary. This change follows the same
logic as `Makefile.qttest.include`.
2024-03-01 23:10:09 +00:00
Hennadii Stepanov
33223f9d55
build: Drop no longer needed MSVC warning suppressions 2023-11-05 17:34:30 +00:00
fanquake
fc4bee3f19
Merge bitcoin/bitcoin#27687: msvc: Provide ObjectFileName explicitly
b8ed95127b msvc: Provide `ObjectFileName` explicitly (Hennadii Stepanov)

Pull request description:

  This PR is a follow-up to https://github.com/bitcoin/bitcoin/pull/26715.

  Fixes intermittent MSVC link [errors](https://cirrus-ci.com/task/6646912535756800).

ACKs for top commit:
  sipsorcery:
    ACK b8ed95127b.

Tree-SHA512: 4319ecf61b578ce66d240998d089b9bb0a42f89dcfcb1a73f648cd3915f566c773721dcff1feba27d393a743d121334ccb890b1a519173e35a156d6135821ef4
2023-05-19 12:32:22 +01:00
fanquake
87d6f6c29d
Merge bitcoin/bitcoin#27615: msvc: Rename libbitcoinconsensus to libbitcoin_consensus and other adjustments
a94d75fa81 msvc: Do not define `HAVE_CONSENSUS_LIB` (Hennadii Stepanov)
cf6ff1031b msvc: Clean up `libbitcoin_consensus` source files (Hennadii Stepanov)
30aee016f1 scripted-diff: Rename `libbitcoinconsensus` to `libbitcoin_consensus` (Hennadii Stepanov)

Pull request description:

  The current Autotools-based build system operates with two build artifacts:
  - [`LIBBITCOIN_CONSENSUS`](3777c75d14/src/Makefile.am (L31)) which is [defined as](https://github.com/bitcoin/bitcoin/blob/master/doc/design/libraries.md) "Stable, backwards-compatible consensus functionality used by _libbitcoin_node_ and _libbitcoin_wallet_"
  - [`LIBBITCOINCONSENSUS`](3777c75d14/src/Makefile.am (L42)) which is [defined as](https://github.com/bitcoin/bitcoin/blob/master/doc/design/libraries.md) "Shared library build of static _libbitcoin_consensus_ library"

  The way how the `libbitcoinconsensus.vcxproj` project is used in the MSVC build system obviously shows that it is the former use case.

  This PR makes the related adjustments to the MSVC build system.

ACKs for top commit:
  sipsorcery:
    ACK a94d75fa81.

Tree-SHA512: 1144e13ee2b428ce14be8f76729744830c502a07814eb03e2aa6b8e009d8936fd13743e3f36ef3f31fac0e3979eb9af23e6a1364f151df49b3ae18dbd14cbf99
2023-05-18 11:34:34 +01:00
Hennadii Stepanov
b8ed95127b
msvc: Provide ObjectFileName explicitly
Should fix intermittent MSVC link errors.
2023-05-17 15:13:11 +01:00
Hennadii Stepanov
30aee016f1
scripted-diff: Rename libbitcoinconsensus to libbitcoin_consensus
This build artifact is not a user-exposed shared library (DLL) but a
convenience static library.
See: https://github.com/bitcoin/bitcoin/blob/master/doc/design/libraries.md

-BEGIN VERIFY SCRIPT-
sed -i 's/libbitcoinconsensus/libbitcoin_consensus/g' $(git grep -l "libbitcoinconsensus" -- build_msvc)
git mv build_msvc/libbitcoinconsensus build_msvc/libbitcoin_consensus
git mv build_msvc/libbitcoin_consensus/libbitcoinconsensus.vcxproj build_msvc/libbitcoin_consensus/libbitcoin_consensus.vcxproj
-END VERIFY SCRIPT-
2023-05-10 11:26:35 +01:00
Andrew Chow
075962bc25 wallet, tests: Include wallet/test/util.h
This will be needed for the following scripted-diff to work.
2023-05-03 10:45:10 -04:00
MacroFake
fad7f2239c
test: Remove unused txmempool include from tests 2022-10-18 14:02:09 +02:00
Ryan Ofsky
84b0973e35 test: Add tests for GetArg methods / settings.json type coercion
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.

Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
2022-03-07 13:29:46 -05:00
Russell Yanofsky
172096e9dd scripted-diff: Rename libbitcoin_server.a to libbitcoin_node.a
Goal along with namespacing PR #23497 is to have src/node/ code in
node:: namespace in libbitcoin_node.a library

-BEGIN VERIFY SCRIPT-
bash -c ' # Bash shell needed for brace expansion {a,b}
git mv build_msvc/libbitcoin_{server,node}
git mv build_msvc/libbitcoin_node/libbitcoin_{server,node}.vcxproj.in
ren() { git grep -l "$1" src build_msvc | xargs sed -i "s/$1/$2/g"; }
ren LIBBITCOIN_{SERVER,NODE}
ren libbitcoin_{server,node}
'
-END VERIFY SCRIPT-
2021-12-20 10:53:01 -05:00
Russell Yanofsky
d5f985e51f multiprocess: Add new bitcoin-gui, bitcoin-qt, bitcoin-wallet init implementations
Add separate init implementations instead of sharing existing bitcoind
and bitcoin-node ones, so they can start to be differentiated in
upcoming commits with node and wallet code no longer linked into the
bitcoin-gui binary and wallet code no longer linked into the
bitcoin-node binary.
2021-09-16 13:17:01 -05:00
Russell Yanofsky
e4709c7b56 Start using init makeNode, makeChain, etc methods
Use interfaces::Init::make* methods instead of interfaces::Make*
functions, so interfaces can be constructed differently in different
executables without having to change any code. (So for example
bitcoin-gui can make an interfaces::Node pointer that communicates with
a bitcoin-node subprocess, while bitcoin-qt can make an interfaces::Node
pointer that starts node code in the same process.)
2021-08-17 03:05:15 -05:00
fanquake
9ac86bcc0d
test: remove qt byteswap compattests
These were added as part of #9366 to fix issues with Protobuf.

Now that we no-longer use Protobuf, there's no reason to maintain a
duplicate set of byteswap tests for qt.
2021-03-29 11:12:26 +08:00
Aaron Clauson
8b99e609e7
Adjusted msvc compiler and linker settings to remove optimisations that are causing sporadic ABI issues on Visual Studio updates.
Tidied up debug and release configuration blocks in common project file to avoid duplication.

Updated appveyor config to use latest Visual Studio 2019 image.

Changed appveyor config file hash to use a new version of Qt pre-compiled binaries built for Visual Studio 2019 v16.8.1.

Bumped vcpkg version to tag '2020.11-1' for binary caching feature.

See #20392 for related discussion.
2020-12-02 11:39:01 +00:00
Aaron Clauson
0874a109da
Ignore msvc linker warning and update to msvc build instructions.
- Update Visual Studio instructions.
- Remove x64 platform conditional from bitcoin-qt project configuration.
- Set use native environment toolset to fix linker warning.
- Ignore linker warning about precompiled type information missing for test_bitcoin_qt.
2020-01-09 09:19:36 +00:00
Aaron Clauson
592af5ad3a
Moved the include of the system projects to before the build depends on task. Otherwise it doesn't get run. 2019-12-13 14:01:52 +00:00
Aaron Clauson
6e2215187e
Included test_bitcoin-qt in msvc build. 2019-12-13 12:07:32 +00:00
MarcoFalke
faec28252c
scripted-diff: test: Move setup_common to test library
-BEGIN VERIFY SCRIPT-
 # Move files
 for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done
 git mv src/test/setup_common.cpp                     src/test/util/
 git mv src/test/setup_common.h                       src/test/util/
 # Replace Windows paths
 sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common')
 sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g'  build_msvc/test_bitcoin/test_bitcoin.vcxproj
 # Everything else
 sed -i -e 's|/setup_common|/util/setup_common|g'    $(git grep -l 'setup_common')
 sed -i -e 's|test/lib/|test/util/|g'                $(git grep -l 'test/lib/')
 # Fix include guard
 sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h
 sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g'                     $(git grep -l 'BITCOIN_TEST_LIB_')
-END VERIFY SCRIPT-
2019-11-06 11:56:41 -05:00
Aaron Clauson
1619684322
Added libbitcoin_qt and bitcoin-qt to the msbuild configuration. 2019-09-08 14:13:05 +02:00
Chun Kuan Lee
8a1f0a38d4 scripted-diff: Remove NDEBUG pre-define
-BEGIN VERIFY SCRIPT-
sed -i 's/NDEBUG;//g' $(git grep --name-only 'NDEBUG;' build_msvc)
-END VERIFY SCRIPT-
2019-02-17 18:26:11 +08:00
Aaron Clauson
ef7beaea6a Visual Studio build configuration for Bitcoin Core 2018-08-10 09:19:00 +02:00