-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[merge] You can now set compiler flags in BUILD.plz files
* build_compiler_opts: [build] Gracefully error when a module has conflicting compiler options [build] Add a compiler_opts field to program entrie [build] Fix indentation in ninja rules [build] Simplify error message creation for interpreting TOML files [build] Add a utility function for default results from TOML searches [build] Refactor the TOML search_result type [build] Refactor how modules are processed [build] rename the pc/pl flags ninja variables
- Loading branch information
Showing
12 changed files
with
319 additions
and
112 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This is free and unencumbered software released into the public domain. | ||
# See ../LICENSE.unlicense | ||
|
||
[options_compiler_01] | ||
type = program | ||
modules = [ OptionsCompiler01 ] | ||
compiler_opts = "--no-simplify" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* vim: ft=plasma | ||
* This is free and unencumbered software released into the public domain. | ||
* See ../LICENSE.unlicense | ||
*/ | ||
|
||
module OptionsCompiler01 | ||
|
||
entrypoint | ||
func hello() uses IO -> Int { | ||
print!("Hello world\n") | ||
|
||
return 0 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This is free and unencumbered software released into the public domain. | ||
# See ../LICENSE.unlicense | ||
|
||
# PLZTEST type compile_failure | ||
|
||
[options_compiler_02] | ||
type = program | ||
modules = [ OptionsCompiler02 ] | ||
compiler_opts = "--nonexistant-option" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error processing command line options: unrecognized option `--nonexistant-option' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* vim: ft=plasma | ||
* This is free and unencumbered software released into the public domain. | ||
* See ../LICENSE.unlicense | ||
*/ | ||
|
||
module OptionsCompiler02 | ||
|
||
entrypoint | ||
func hello() uses IO -> Int { | ||
print!("Hello world\n") | ||
|
||
return 0 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This is free and unencumbered software released into the public domain. | ||
# See ../LICENSE.unlicense | ||
|
||
# PLZTEST type compile_failure | ||
|
||
# This test asks the build system to build the same module with different | ||
# settings, it should fail. | ||
|
||
[options_compiler_03a] | ||
type = program | ||
modules = [ OptionsCompiler03a, OptionsCompiler03 ] | ||
compiler_opts = "--no-simplify" | ||
|
||
[options_compiler_03b] | ||
type = program | ||
modules = [ OptionsCompiler03b, OptionsCompiler03 ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
options_compiler_03.build:11: Flags set for the same module in different | ||
programs do not match |