Set a flag available at runtime when cross compiling kitty-tool
This commit is contained in:
parent
5a71b8c209
commit
8d12e60f62
2 changed files with 3 additions and 0 deletions
|
|
@ -282,6 +282,7 @@ def generate_constants() -> str:
|
|||
const VCSRevision string = ""
|
||||
const RC_ENCRYPTION_PROTOCOL_VERSION string = "{kc.RC_ENCRYPTION_PROTOCOL_VERSION}"
|
||||
const IsFrozenBuild bool = false
|
||||
const IsStandaloneBuild bool = false
|
||||
const HandleTermiosSignals = {Mode.HANDLE_TERMIOS_SIGNALS.value[0]}
|
||||
var Version VersionType = VersionType{{Major: {kc.version.major}, Minor: {kc.version.minor}, Patch: {kc.version.patch},}}
|
||||
var DefaultPager []string = []string{{ {dp} }}
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -900,6 +900,8 @@ def build_kitty_tool(
|
|||
ld_flags = [f"-X 'kitty.VCSRevision={get_vcs_rev_define()}'"]
|
||||
if for_freeze:
|
||||
ld_flags.append("-X 'kitty.IsFrozenBuild=true'")
|
||||
if for_platform:
|
||||
ld_flags.append("-X 'kitty.IsStandaloneBuild=true'")
|
||||
if not args.debug:
|
||||
ld_flags.append('-s')
|
||||
ld_flags.append('-w')
|
||||
|
|
|
|||
Loading…
Reference in a new issue