@@ -784,7 +784,7 @@ index 2d5d241ebf..72aae9e270 100644
784
784
if cpu_type in allowed_values:
785
785
return V8CpuTypeInfo(value = cpu_type)
786
786
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
787
- index 53fccf92e7..14fff6f049 100644
787
+ index 53fccf92e7..8efd27f129 100644
788
788
--- a/bazel/defs.bzl
789
789
+++ b/bazel/defs.bzl
790
790
@@ -89,7 +89,7 @@ def _default_args():
@@ -796,7 +796,7 @@ index 53fccf92e7..14fff6f049 100644
796
796
"UNICODE",
797
797
"_UNICODE",
798
798
"_CRT_RAND_S",
799
- @@ -98,29 +98,59 @@ def _default_args():
799
+ @@ -98,29 +98,63 @@ def _default_args():
800
800
"//conditions:default": [],
801
801
}),
802
802
copts = select({
@@ -818,6 +818,10 @@ index 53fccf92e7..14fff6f049 100644
818
818
],
819
819
"//conditions:default": [],
820
820
+ }) + select({
821
+ + "@v8//bazel/config:is_s390x": [
822
+ + "-fno-integrated-as",
823
+ + ],
824
+ + }) + select({
821
825
+ "@v8//bazel/config:is_clang": [
822
826
+ "-Wno-invalid-offsetof",
823
827
+ "-std=c++17",
@@ -860,28 +864,28 @@ index 53fccf92e7..14fff6f049 100644
860
864
"//conditions:default": ["-Wl,--no-as-needed -ldl -pthread"],
861
865
}) + select({
862
866
":should_add_rdynamic": ["-rdynamic"],
863
- @@ -248,8 +278 ,10 @@ def v8_library(
867
+ @@ -248,8 +282 ,10 @@ def v8_library(
864
868
)
865
-
869
+
866
870
def _torque_impl(ctx):
867
871
- v8root = "."
868
872
- prefix = ctx.attr.prefix
869
873
+ if ctx.workspace_name == "v8":
870
874
+ v8root = "."
871
875
+ else:
872
876
+ v8root = "external/v8"
873
-
877
+
874
878
# Arguments
875
879
args = []
876
- @@ -301,7 +333 ,6 @@ _v8_torque = rule(
880
+ @@ -301,7 +337 ,6 @@ _v8_torque = rule(
877
881
cfg = "exec",
878
882
),
879
883
"args": attr.string_list(),
880
884
- "v8root": attr.label(default = ":v8_root"),
881
885
},
882
886
)
883
-
884
- @@ -313,7 +344 ,7 @@ def v8_torque(name, noicu_srcs, icu_srcs, args, extras):
887
+
888
+ @@ -313,7 +348 ,7 @@ def v8_torque(name, noicu_srcs, icu_srcs, args, extras):
885
889
args = args,
886
890
extras = extras,
887
891
tool = select({
@@ -890,7 +894,7 @@ index 53fccf92e7..14fff6f049 100644
890
894
"//conditions:default": ":torque",
891
895
}),
892
896
)
893
- @@ -324,7 +355 ,7 @@ def v8_torque(name, noicu_srcs, icu_srcs, args, extras):
897
+ @@ -324,7 +359 ,7 @@ def v8_torque(name, noicu_srcs, icu_srcs, args, extras):
894
898
args = args,
895
899
extras = extras,
896
900
tool = select({
@@ -899,21 +903,23 @@ index 53fccf92e7..14fff6f049 100644
899
903
"//conditions:default": ":torque",
900
904
}),
901
905
)
902
- @@ -334,6 +365,7 @@ def _v8_target_cpu_transition_impl(settings, attr):
906
+ @@ -334,22 +369,24 @@ def _v8_target_cpu_transition_impl(settings, attr):
903
907
"haswell": "x64",
904
908
"k8": "x64",
905
909
"x86_64": "x64",
906
910
+ "darwin": "x64",
907
911
"darwin_x86_64": "x64",
908
912
"x86": "ia32",
909
913
"ppc": "ppc64",
910
- @@ -342,14 +374,14 @@ def _v8_target_cpu_transition_impl(settings, attr):
914
+ "arm64-v8a": "arm64",
915
+ "arm": "arm64",
911
916
"armeabi-v7a": "arm32",
917
+ + "s390x": "s390x",
912
918
}
913
919
v8_target_cpu = mapping[settings["//command_line_option:cpu"]]
914
920
- return {"@config//:v8_target_cpu": v8_target_cpu}
915
921
+ return {"@v8//bazel/config:v8_target_cpu": v8_target_cpu}
916
-
922
+
917
923
# Set the v8_target_cpu to be the correct architecture given the cpu specified
918
924
# on the command line.
919
925
v8_target_cpu_transition = transition(
0 commit comments