@@ -375,43 +375,6 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
375375 "--no-insert-timestamp" ,
376376 "--no-dynamicbase" ,
377377 )
378- } else if goos == "uefi" {
379- spec .Triple = strings .ReplaceAll (triple , "-unknown-uefi" , "-unknown-windows-gnu" )
380- spec .GOOS = "linux"
381- spec .Linker = "ld.lld"
382- spec .Libc = "picolibc"
383- spec .BuildTags = append (spec .BuildTags , "baremetal" )
384- spec .CFlags = append (spec .CFlags ,
385- "-ffreestanding" ,
386- "-fshort-wchar" ,
387- "-fshort-enums" ,
388- "-mno-red-zone" ,
389- )
390- switch goarch {
391- case "amd64" , "i386" :
392- spec .LDFlags = append (spec .LDFlags ,
393- "-m" , "i386pep" ,
394- "--image-base" , "0x400000" ,
395- )
396- spec .ExtraFiles = append (spec .ExtraFiles ,
397- "src/device/x86/cpu_" + goarch + ".S" ,
398- )
399- case "arm64" :
400- spec .LDFlags = append (spec .LDFlags ,
401- "-m" , "arm64pe" ,
402- )
403- }
404- spec .LDFlags = append (spec .LDFlags ,
405- "--entry" , "efi_main" ,
406- "--subsystem" , "efi_application" ,
407- "-Bdynamic" ,
408- "--gc-sections" ,
409- "--no-insert-timestamp" ,
410- "--no-dynamicbase" ,
411- )
412- spec .ExtraFiles = append (spec .ExtraFiles ,
413- "src/machine/uefi/asm_" + goarch + ".S" ,
414- )
415378 } else if goos == "wasip1" {
416379 spec .GC = "" // use default GC
417380 spec .Scheduler = "asyncify"
@@ -433,7 +396,7 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
433396 }
434397 if goarch != "wasm" {
435398 suffix := ""
436- if ( goos == "windows" || goos == "uefi" ) && goarch == "amd64" {
399+ if goos == "windows" && goarch == "amd64" {
437400 // Windows uses a different calling convention on amd64 from other
438401 // operating systems so we need separate assembly files.
439402 suffix = "_windows"
0 commit comments