Fix ignored gn local variable
The current way "use_subzero" was used seems to fail when
compiling with goma (I don't see why, honestly). Anyway,
most build configuration related booleans are declared in
a declare_args() section, so I moved the setting there,
which will hopefully solve the issue.
Change-Id: I063d9938d04bfdf8140878a740f3710309f8bf1e
Reviewed-on: https://swiftshader-review.googlesource.com/8714
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Reactor/BUILD.gn b/src/Reactor/BUILD.gn
index dccf4cd..499b838 100644
--- a/src/Reactor/BUILD.gn
+++ b/src/Reactor/BUILD.gn
@@ -12,6 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+declare_args() {
+ # Currently, Subzero is not used by default
+ # LLVM is still the default backend
+ use_swiftshader_with_subzero = false
+}
+
# Need a separate config to ensure the warnings are added to the end.
config("swiftshader_subzero_common_private_config") {
defines = [
@@ -242,11 +248,7 @@
"Routine.cpp",
]
- # Currently, Subzero will only be used on Windows
- # LLVM will be used on Linux and MacOS
- use_subzero = false
-
- if (use_subzero) {
+ if (use_swiftshader_with_subzero) {
deps += [ ":swiftshader_subzero" ]
sources += [