Skip to content

thirdparty: make foreign_build.bld Starlark-parseable#212

Merged
chen3feng merged 1 commit into
masterfrom
foreign-build-starlark-compat
Jul 2, 2026
Merged

thirdparty: make foreign_build.bld Starlark-parseable#212
chen3feng merged 1 commit into
masterfrom
foreign-build-starlark-compat

Conversation

@chen3feng

Copy link
Copy Markdown
Collaborator

blade-go's front-end is Starlark, which (unlike Python) has no generator expressions or implicit string concatenation. Convert foreign_build.bld to equivalent Starlark forms so it can be include()'d there — no behavior change under Python Blade:

  • generator expr → list comprehension in the rpath ' '.join(...).
  • adjacent-string-literal concat → explicit + in dyld_path, the autotools configure command, and the cmake generate command (parenthesized so the trailing % (...) still applies to the whole concatenation).
  • fix cmake_cc_library, which was dead-but-unparseable (referenced undefined package_name/deps/with_packages): give it deps/with_packages params, pass package_name=name and source_package through — mirrors autotools_cc_library.

Same Starlark-compat class as the cc_flare_library change in build_rules.bld (#211).

blade-go's front-end is Starlark, which (unlike Python) has no generator
expressions or implicit string concatenation. Convert foreign_build.bld to the
equivalent Starlark forms so it can be include()'d there, with no behavior change
under Python Blade:

- generator expr -> list comprehension in the rpath ' '.join(...).
- adjacent-string-literal concatenation -> explicit '+' in dyld_path, the
  autotools configure command, and the cmake generate command (parenthesized so
  the trailing `% (...)` still applies to the whole concatenation).
- fix cmake_cc_library, which was dead-but-unparseable: it referenced undefined
  package_name/deps/with_packages. Give it deps/with_packages params, pass
  package_name=name and source_package through (mirrors autotools_cc_library).

Same Starlark-compat class as the cc_flare_library change in the build_rules.bld.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chen3feng chen3feng merged commit 6320851 into master Jul 2, 2026
10 checks passed
@chen3feng chen3feng deleted the foreign-build-starlark-compat branch July 2, 2026 14:23
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