Transitioned to using CTCE for Kraken compile information

This commit is contained in:
Nathan Braswell
2016-07-06 00:22:33 -07:00
parent f71b5f3576
commit a5deef8c30
2 changed files with 10 additions and 17 deletions

View File

@@ -15,7 +15,6 @@ import defer_lower:*
import ctce_lower:*
import c_line_control:*
import c_generator:*
import compiler_version
fun main(argc: int, argv: **char):int {
// delay construction until we either load it or copy construct it
@@ -34,14 +33,13 @@ fun main(argc: int, argv: **char):int {
file_contents = string("RealGoal = boolean_expression ;\n") + file_contents
doing_repl = true
} else if (string(argv[1]) == "-v" || string(argv[1]) == "--version") {
println(compiler_version::version_string)
/*var version_c_string = #ctce(fun(): *char {*/
/*var version_string = string("Self-hosted Kraken compiler \"Kalypso\" - revision ") + from_system_command(string("git rev-list HEAD | wc -l"), 100) +*/
/*", commit: " + from_system_command(string("git rev-parse HEAD"), 100) +*/
/*", compile date: " + from_system_command(string("date"), 100) */
/*return version_string.toCharArray()*/
/*}())*/
/*println(version_c_string)*/
var version_c_string = #ctce(fun(): *char {
var version_string = string("Self-hosted Kraken compiler \"Kalypso\" - revision ") + from_system_command(string("git rev-list HEAD | wc -l"), 100) +
", commit: " + from_system_command(string("git rev-parse HEAD"), 100) +
", compile date: " + from_system_command(string("date"), 100)
return version_string.toCharArray()
}())
println(version_c_string)
exit(0)
}
var input_file_offset = 1