[MSVC] Copy build output to src/ automatically after build #16308

pull NicolasDorier wants to merge 1 commits into bitcoin:master from NicolasDorier:build/copy-in-msbuild changing 23 files +32 −3
  1. NicolasDorier commented at 5:40 am on June 29, 2019: contributor

    I got frustrated many time that I run functional tests on an outdated binary.

    This make sure that files are properly copied (and debuggable) for functional tests after a build.

    This PR add a common.vcxproj which can be used to extend the build steps. I can’t move it in common.init, because build step customization must always come at the end of a project file.

  2. fanquake added the label Build system on Jun 29, 2019
  3. fanquake added the label Windows on Jun 29, 2019
  4. DrahtBot commented at 6:13 am on June 29, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15529 (Add Qt programs to msvc build (updated, no code changes) by sipsorcery)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. NicolasDorier commented at 6:26 am on June 29, 2019: contributor
    Not working on appveyor… trying to find out why.
  6. NicolasDorier force-pushed on Jun 29, 2019
  7. NicolasDorier force-pushed on Jun 29, 2019
  8. sipsorcery commented at 8:03 am on June 29, 2019: member

    @NicolasDorier any reason why you’re adding the common.vcxproj include to the library projects, libunivalue, libsecp256k1 etc?

    They don’t produce anything that can be tested so there shouldn’t be any need to copy their output to the src directory.

  9. NicolasDorier commented at 8:10 am on June 29, 2019: contributor

    @sipsorcery to step by step into it if we are debugging bitcoind which is running as part of functional tests.

    That said I agree, I am mixed about where it is really needed.

  10. NicolasDorier commented at 8:12 am on June 29, 2019: contributor
    I think it is nice that common be in ALL files. But I can add a way to disable the copy specifically for dynamic libraries.
  11. sipsorcery commented at 8:17 am on June 29, 2019: member
    The Bitcoin Core msbuild config uses static linking for all applications so there are no dll’s and the executables will all import all the symbols they use.
  12. NicolasDorier commented at 8:20 am on June 29, 2019: contributor
    good point, will remove it.
  13. NicolasDorier force-pushed on Jun 29, 2019
  14. NicolasDorier commented at 8:37 am on June 29, 2019: contributor

    @sipsorcery I kept the common.proj references, it would be counter intuitive to not have it for all project like we do for common.init.

    That said, I specifically exclude this task from running if we are building a static library.

  15. in build_msvc/bitcoind/bitcoind.vcxproj:74 in fba3885573 outdated
    70@@ -71,4 +71,5 @@
    71     <ReplaceInFile FilePath="$(ConfigIniOut)"
    72                   Replace="@ENABLE_ZMQ_TRUE@" By=""></ReplaceInFile>
    73   </Target>
    74+  <Import Project="..\common.vcxproj" />
    


    MarcoFalke commented at 12:51 pm on June 29, 2019:
    An alternative would be to properly set abs_top_builddir in this file?
  16. NicolasDorier commented at 1:35 am on June 30, 2019: contributor

    @MarcoFalke do you mean moving what I did in bitcoind project file in #16258 to the common.vcxproj?

    I thought about it, but at the end of the day, only the bitcoind binary get tested by the functional tests so I think it makes sense for the bitcoin.ini to be generated only as part of the bitcoind project.

  17. MarcoFalke commented at 3:14 pm on June 30, 2019: member
    I meant to set abs_top_builddir=build_msvc\${env:PLATFORM}\${env:CONFIGURATION}\, but I just realized that doesn’t work, because we assume the binaries are in abs_top_builddir/src, which is not created by msvc.
  18. sipsorcery commented at 7:42 pm on June 30, 2019: member
    tACK fba3885573c7ff63f51163b57b1378e6491ae900.
  19. NicolasDorier commented at 2:22 am on July 1, 2019: contributor
    @MarcoFalke well, an alternative I thought is to change the outdir of all configuration/plateform to use src/ instead so binaries get generated there. But I am not so sure everyone like it, because this directory structure is a sort of “standard” for people using visual studio.
  20. NicolasDorier force-pushed on Jul 1, 2019
  21. NicolasDorier commented at 10:14 am on July 1, 2019: contributor
    I just modified the .in files. While not being used (step skipped as they are static libs), we may want in the future to customize their build steps.
  22. [MSVC] Copy build output to src/ automatically after build 08c721dab2
  23. NicolasDorier force-pushed on Jul 1, 2019
  24. NicolasDorier commented at 10:17 am on July 1, 2019: contributor
    Added a user customization capabilities similar to https://github.com/bitcoin/bitcoin/pull/16309
  25. sipsorcery commented at 8:44 pm on July 4, 2019: member
    tACK 08c721dab2b6d33f11ecf5ed089841d1fc9d8d15.
  26. fanquake approved
  27. fanquake commented at 2:09 am on July 5, 2019: member

    ACK 08c721dab2b6d33f11ecf5ed089841d1fc9d8d15

    Ran a sanity check that building on Windows using Visual Studio still works.

  28. fanquake merged this on Jul 5, 2019
  29. fanquake closed this on Jul 5, 2019

  30. fanquake referenced this in commit 4f378ac30c on Jul 5, 2019
  31. fanquake locked this on Jul 18, 2020

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me