Bug 1991041 - Disable SVE parts of libyuv when the SVE flags are not supported. a=RyanVM DONTBUILD

While here, remove the LIBYUV_SVE define which is unused, and remove
the duplicate block adding it and the dependency on libyuv_sve.

Original Revision: https://phabricator.services.mozilla.com/D266315

Differential Revision: https://phabricator.services.mozilla.com/D266722
This commit is contained in:
Mike Hommey
2025-09-30 02:33:44 +00:00
committed by rvandermeulen@mozilla.com
parent 1bff56c7d7
commit 84e4a3c49a
2 changed files with 19 additions and 24 deletions

View File

@@ -13,7 +13,7 @@ index 45df0d2e26192..e2aa2d7c69404 100644
], ],
'conditions': [ 'conditions': [
# Disable LTO in libyuv_neon target due to gcc 4.9 compiler bug. # Disable LTO in libyuv_neon target due to gcc 4.9 compiler bug.
@@ -83,16 +81,6 @@ @@ -108,16 +106,6 @@
'-ffat-lto-objects', '-ffat-lto-objects',
], ],
}], }],
@@ -30,7 +30,19 @@ index 45df0d2e26192..e2aa2d7c69404 100644
], ],
}], }],
['build_msa != 0', { ['build_msa != 0', {
@@ -162,12 +150,105 @@ @@ -157,6 +145,11 @@
}],
],
}],
+ ['target_arch == "arm64" and moz_have_arm_sve2 != 1 and build_with_mozilla == 1', {
+ 'defines' :[
+ 'LIBYUV_DISABLE_SVE',
+ ]
+ }],
], #conditions
'defines': [
# Enable the following 3 macros to turn off assembly for specified CPU.
@@ -186,12 +179,94 @@
'-Wl,--dynamic-linker,/system/bin/linker', '-Wl,--dynamic-linker,/system/bin/linker',
], ],
}], }],
@@ -43,17 +55,6 @@ index 45df0d2e26192..e2aa2d7c69404 100644
+ 'dependencies': [ + 'dependencies': [
+ ':libyuv_sve', + ':libyuv_sve',
+ ], + ],
+ 'defines' :[
+ 'LIBYUV_SVE',
+ ]
+ }],
+ ['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', {
+ 'dependencies': [
+ ':libyuv_sve',
+ ],
+ 'defines' :[
+ 'LIBYUV_SVE',
+ ]
+ }], + }],
], #conditions ], #conditions
}, },

View File

@@ -130,6 +130,11 @@
}], }],
], ],
}], }],
['target_arch == "arm64" and moz_have_arm_sve2 != 1 and build_with_mozilla == 1', {
'defines' :[
'LIBYUV_DISABLE_SVE',
]
}],
], #conditions ], #conditions
'defines': [ 'defines': [
'LIBYUV_DISABLE_SME', 'LIBYUV_DISABLE_SME',
@@ -170,17 +175,6 @@
'dependencies': [ 'dependencies': [
':libyuv_sve', ':libyuv_sve',
], ],
'defines' :[
'LIBYUV_SVE',
]
}],
['target_arch == "arm64" and moz_have_arm_sve2 == 1 and build_with_mozilla == 1', {
'dependencies': [
':libyuv_sve',
],
'defines' :[
'LIBYUV_SVE',
]
}], }],
], #conditions ], #conditions
}, },