Add Visual Studio calling convention support
Add callingconvention directive, possible values are: Cdecl, FastCall, StdCall or VectorCall.
This commit is contained in:
parent
7965886fb0
commit
fbd2d5d707
@ -466,6 +466,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "callingconvention",
|
||||
scope = "config",
|
||||
kind = "string",
|
||||
allowed = {
|
||||
"Cdecl",
|
||||
"FastCall",
|
||||
"StdCall",
|
||||
"VectorCall",
|
||||
}
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "forceincludes",
|
||||
scope = "config",
|
||||
|
@ -322,6 +322,7 @@
|
||||
m.multiProcessorCompilation,
|
||||
m.additionalCompileOptions,
|
||||
m.compileAs,
|
||||
m.callingConvention,
|
||||
}
|
||||
end
|
||||
|
||||
@ -1599,7 +1600,11 @@
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.callingConvention(cfg)
|
||||
if cfg.callingconvention then
|
||||
p.w('<CallingConvention>%s</CallingConvention>', cfg.callingconvention)
|
||||
end
|
||||
end
|
||||
|
||||
function m.runtimeTypeInfo(cfg)
|
||||
if cfg.flags.NoRTTI and cfg.clr == p.OFF then
|
||||
|
@ -46,6 +46,12 @@
|
||||
Fast = "/fp:fast",
|
||||
Strict = "/fp:strict",
|
||||
},
|
||||
callingconvention = {
|
||||
Cdecl = "/Gd",
|
||||
FastCall = "/Gr",
|
||||
StdCall = "/Gz",
|
||||
VectorCall = "/Gv",
|
||||
},
|
||||
optimize = {
|
||||
Off = "/Od",
|
||||
On = "/Ot",
|
||||
|
Loading…
Reference in New Issue
Block a user