Skip to content

perf: skip dry-run build for run --list and test --list#1294

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

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

Conversation

@krystophny

@krystophny krystophny commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Return from fpm run --list and fpm test --list after candidate enumeration
  • The old path enumerated candidates, called build_package(..., dry_run=.true.),
    then printed the same list; list mode does not need target sorting or compile-command
    dry runs
  • Normal run and test still call build_package before executing binaries

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 test --list, median of 3):

parallel: 0.51s main, 0.39s branch, 0.12s faster, 23.5%
serial:   0.46s main, 0.40s branch, 0.06s faster, 13.0%

Matched-name output is identical.

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