Skip to content

Commit ff0765d

Browse files
committed
refactor(boot): squash x86_64 into amd64
When we parse this as a string, we can squash it down rather than having to double check later. Signed-off-by: Ali Caglayan <[email protected]>
1 parent 6cd8230 commit ff0765d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

boot/duneboot.ml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,12 @@ module Arch = struct
325325
type t =
326326
[ `arm64
327327
| `amd64
328-
| `x86_64
329328
| `other
330329
]
331330

332331
let of_string : string -> t = function
333332
| "arm64" -> `arm64
334-
| "amd64" -> `amd64
335-
| "x86_64" -> `x86_64
333+
| "x86_64" | "amd64" -> `amd64
336334
| _ -> `other
337335
;;
338336
end
@@ -1443,7 +1441,7 @@ module Library = struct
14431441
match arch with
14441442
| None -> true
14451443
| Some `Arm64 -> architecture = `arm64
1446-
| Some `X86 -> architecture = `amd64 || architecture = `x86_64
1444+
| Some `X86 -> architecture = `amd64
14471445
;;
14481446

14491447
let make_c (c : File_kind.c) ~fn ~os_type ~word_size =

0 commit comments

Comments
 (0)