-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read compiler configurations from toml #1347
Merged
xermicus
merged 13 commits into
hyperledger:main
from
salaheldinsoliman:config_from_toml
Jun 23, 2023
+930
−48
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a3ef22e
fix vscode test
salaheldinsoliman c6f31c6
Merge branch 'hyperledger:main' into config_from_toml
salaheldinsoliman f2dec3c
add docs/ improve import_maps
salaheldinsoliman 7199c9b
Merge branch 'hyperledger:main' into config_from_toml
salaheldinsoliman f429d82
add docs/ improve import_maps
salaheldinsoliman a05898b
Merge branch 'config_from_toml' of https://github.com/salaheldinsolim…
salaheldinsoliman 01d5c11
toml 0.7
salaheldinsoliman 9faf0a1
merge main into config_from_toml
salaheldinsoliman 39ca8fd
remove required_unless_needed
salaheldinsoliman b643486
fix compilation without wasm_opt
salaheldinsoliman d93c842
lints
salaheldinsoliman fa12307
Merge branch 'hyperledger:main' into config_from_toml
salaheldinsoliman ed601fa
Apply suggestions from code review
xermicus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,29 @@ | ||
[package] | ||
input_files = ["flipper.sol"] # Files to be compiled. You can define multiple files as : input_files = ["file1", "file2", ..] | ||
contracts = ["flipper"] # Contracts to include from the compiled files | ||
import_path = [] | ||
import_map = {} # Maps to import. Define as import_map = {map = "path/to/map1", map2 = "path/to/map2"} | ||
|
||
|
||
[target] | ||
name = "solana" # Valid targets are "solana" and "substrate" | ||
|
||
[debug-features] | ||
prints = true # Log debug prints to the environment. | ||
log-runtime-errors = true # Log runtime errors to the environment. | ||
generate-debug-info = false # Add debug info to the generated llvm IR. | ||
|
||
[optimizations] | ||
dead-storage = true | ||
constant-folding = true | ||
strength-reduce = true | ||
vector-to-slice = true | ||
common-subexpression-elimination = true | ||
llvm-IR-optimization-level = "default" # Set llvm optimizer level. Valid options are "none", "less", "default", "aggressive" | ||
|
||
[compiler-output] | ||
verbose = false # show debug messages | ||
#emit = "llvm-ir" # Emit compiler state at early stage. Valid options are: "ast-dot", "cfg", "llvm-ir", "llvm-bc", "object", "asm". | ||
#output_directory = "path/to/dir" | ||
#output_meta = "path/to/dir" # output directory for metadata | ||
std_json_output = false # mimic solidity json output on stdout |
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,32 @@ | ||
[package] | ||
input_files = ["flipper.sol"] # Files to be compiled. You can define multiple files as : input_files = ["file1", "file2", ..] | ||
contracts = ["flipper"] # Contracts to include from the compiled files | ||
import_path = [] | ||
import_map = {} # Maps to import. Define as import_map = {map = "path/to/map1", map2 = "path/to/map2"} | ||
|
||
|
||
[target] | ||
name = "substrate" # Valid targets are "solana" and "substrate" | ||
address_length = 32 | ||
value_length = 16 | ||
|
||
|
||
[debug-features] | ||
prints = true # Log debug prints to the environment. | ||
log-runtime-errors = true # Log runtime errors to the environment. | ||
generate-debug-info = false # Add debug info to the generated llvm IR. | ||
|
||
[optimizations] | ||
dead-storage = true | ||
constant-folding = true | ||
strength-reduce = true | ||
vector-to-slice = true | ||
common-subexpression-elimination = true | ||
llvm-IR-optimization-level = "default" # Set llvm optimizer level. Valid options are "none", "less", "default", "aggressive" | ||
|
||
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FIY I just merged #1365, could you include that here too? |
||
[compiler-output] | ||
verbose = false # show debug messages | ||
#emit = "llvm-ir" # Emit compiler state at early stage. Valid options are: "ast-dot", "cfg", "llvm-ir", "llvm-bc", "object", "asm". | ||
#output_directory = "path/to/dir" | ||
#output_meta = "path/to/dir" # output directory for metadata | ||
std_json_output = false # mimic solidity json output on stdout |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not apply to llvm-IR only, also to target specific machine code. This should be called
llvm-optimization-level