build: update scripting and tooling to rely on define=angular_ivy_enabled instream of define=compile (#33983)
We need to migrate to using angular_ivy_enabled value to determine whether to use Ivy or ViewEngine for package building scripts and for size-tracking and symbol-extract tooling. PR Close #33983
This commit is contained in:

committed by
Matias Niemelä

parent
fec9f7dce5
commit
6bf258178d
@ -47,10 +47,10 @@ module.exports = {
|
||||
*
|
||||
* @param {string} destPath Path to the output directory into which we copy the npm packages.
|
||||
* This path should either be absolute or relative to the project root.
|
||||
* @param {'legacy' | 'aot'} compileMode Either `legacy` (view engine) or `aot` (ivy).
|
||||
* @param {boolean} enableIvy True, if Ivy should be used.
|
||||
* @param {string} description Human-readable description of the build.
|
||||
*/
|
||||
function buildTargetPackages(destPath, compileMode, description) {
|
||||
function buildTargetPackages(destPath, enableIvy, description) {
|
||||
console.log('##################################');
|
||||
console.log(`${scriptPath}:`);
|
||||
console.log(' Building @angular/* npm packages');
|
||||
@ -65,7 +65,7 @@ function buildTargetPackages(destPath, compileMode, description) {
|
||||
const targets = exec(getTargetsCmd, true).split(/\r?\n/);
|
||||
|
||||
// Use `--config=release` so that snapshot builds get published with embedded version info.
|
||||
exec(`${bazelCmd} build --config=release --define=compile=${compileMode} ${targets.join(' ')}`);
|
||||
exec(`${bazelCmd} build --config=release --config=${enableIvy ? 'ivy' : 'view-engine'} ${targets.join(' ')}`);
|
||||
|
||||
// Create the output directory.
|
||||
const absDestPath = resolve(baseDir, destPath);
|
||||
|
Reference in New Issue
Block a user