ツールチェーンとは?
ツールチェーンは、ソースコードを実行可能な artifact に変換するツールの集合で、通常はコンパイラ、アセンブラ、リンカ、および補助ユーティリティを含み、しばしば一緒にバージョン管理されます。ツールチェーンの正確なバージョンを固定することは再現性にとって重要です。異なるコンパイラは同じソースから異なる出力を生成しうるためです。
なぜ重要か
build はソースだけでなく、それを処理するツールにも依存するため、固定されていないツールチェーンは再現性を壊す隠れた入力であり、works-on-my-machine の失敗を引き起こしかねません。ツールチェーンを宣言して固定すること、理想的には hermetic な入力として固定することで、CI の build をローカルのものと一致させ続けられます。
関連する概念
- コンパイラ、リンカ、build システムを含む
- そのバージョンを固定すると再現性が向上する
- cross-compilation は別の target 向けのツールチェーンを使う
関連ガイド
What Is Cross-Compilation?Cross-compilation builds executables for a different platform than the one doing the build, such as compiling…
What Is a Hermetic Toolchain?A hermetic toolchain is a build toolchain pinned and packaged as an explicit input, so builds do not depend o…
What Is a Deterministic Build?A deterministic build produces the same output from the same inputs every time, with no run-to-run variation…