Skip to content

perf: skip dry-run build for build --list#1295

Open
krystophny wants to merge 1 commit into
fortran-lang:mainfrom
krystophny:perf/skip-build-list-dry-run
Open

perf: skip dry-run build for build --list#1295
krystophny wants to merge 1 commit into
fortran-lang:mainfrom
krystophny:perf/skip-build-list-dry-run

Conversation

@krystophny

@krystophny krystophny commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Return from fpm build --list after printing the target paths
  • The old path printed target paths, then called
    build_package(..., dry_run=.true.); list mode does not need build graph
    sorting after the target list is already available
  • --show-model still prints the model when requested

Merge order

Independent PRs (any order):

Stacked chain (merge in order):

  1. Fortran compiles via argv (feat: exec Fortran compiles via argv (posix_spawn/CreateProcess) #1299)
  2. Parallel link/archive via argv (feat: run link and archive in parallel via argv spawn #1300)
  3. C/C++ compiles via argv (feat: exec C/C++ compiles via argv, close the shell-fork gap #1301)

Fork-safety fix:

After the above:

Verification

$ fpm build --features openmp --compiler gfortran --flag '-O3 -g'
[100%] Project compiled successfully.

$ fpm test
TALLY;TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
PASSED: all 35 tests passed

Benchmark (fpm self build --list, median of 3):

parallel: 0.59s main, 0.39s branch, 0.20s faster, 33.9%
serial:   0.45s main, 0.40s branch, 0.05s faster, 11.1%

Target list is identical after normalizing the build-dir prefix.

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.

1 participant