This commit is contained in:
parent
7d2eb95c83
commit
6d15ff3a35
9 changed files with 116 additions and 43 deletions
|
@ -72,9 +72,23 @@ func (s *scanner) scanFunction(file *fs.File, tokens token.List, i int) (int, er
|
|||
|
||||
switch s.build.Arch {
|
||||
case build.ARM:
|
||||
function.CPU = &arm.CPU
|
||||
switch s.build.OS {
|
||||
case build.Linux:
|
||||
function.CPU = &arm.LinuxCPU
|
||||
case build.Mac:
|
||||
function.CPU = &arm.MacCPU
|
||||
case build.Windows:
|
||||
function.CPU = &arm.WindowsCPU
|
||||
}
|
||||
case build.X86:
|
||||
function.CPU = &x86.CPU
|
||||
switch s.build.OS {
|
||||
case build.Linux:
|
||||
function.CPU = &x86.LinuxCPU
|
||||
case build.Mac:
|
||||
function.CPU = &x86.MacCPU
|
||||
case build.Windows:
|
||||
function.CPU = &x86.WindowsCPU
|
||||
}
|
||||
}
|
||||
|
||||
function.Body = tokens[bodyStart:i]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue