-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and fix target config file templates (#1546)
We don't want to maintain the same files twice. For Polkadot, one version was outdated. The other one contained an invalid config for `wasm-opt`.
- Loading branch information
Showing
10 changed files
with
117 additions
and
163 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
Cargo.lock | ||
examples | ||
build | ||
target | ||
.gitnore | ||
|
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,63 @@ | ||
[package] | ||
authors = ["Your Name <[email protected]>"] | ||
version = "0.1.0" | ||
|
||
# Source files to be compiled. | ||
input_files = ["flipper.sol"] | ||
|
||
# Contracts to be compiled. | ||
# If no contracts are specified, solang will compile all non-virtual contracts. | ||
contracts = ["flipper"] | ||
|
||
# Specify required import paths. | ||
import_path = [] | ||
|
||
# Define any importmaps. | ||
# import_map = { "@openzeppelin" = "/home/user/libraries/openzeppelin-contracts/" } | ||
import_map = {} | ||
|
||
|
||
[target] | ||
name = "polkadot" | ||
address_length = 32 | ||
value_length = 16 | ||
|
||
|
||
[debug-features] | ||
# Log debug prints to the environment. | ||
prints = true | ||
|
||
# Log runtime errors to the environment. | ||
log-runtime-errors = true | ||
|
||
# Add debug info to the generated llvm IR. | ||
generate-debug-info = false | ||
|
||
[optimizations] | ||
dead-storage = true | ||
constant-folding = true | ||
strength-reduce = true | ||
vector-to-slice = true | ||
common-subexpression-elimination = true | ||
|
||
|
||
# Valid wasm-opt passes are: Zero, One, Two, Three, Four, S, (focusing on code size) or Z (super-focusing on code size) | ||
wasm-opt = "Z" | ||
|
||
# Valid LLVM optimization levels are: none, less, default, aggressive | ||
llvm-IR-optimization-level = "aggressive" | ||
|
||
[compiler-output] | ||
verbose = false | ||
|
||
# Emit compiler state at early stages. Valid options are: ast-dot, cfg, llvm-ir, llvm-bc, object, asm | ||
# emit = "llvm-ir" | ||
|
||
# Output directory for binary artifacts. | ||
# output_directory = "path/to/dir" | ||
|
||
# Output directory for the metadata. | ||
# output_meta = "path/to/dir" | ||
|
||
# Output everything in a JSON format on STDOUT instead of writing output files. | ||
std_json_output = false |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,55 @@ | ||
[package] | ||
version = "0.1.0" | ||
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"} | ||
|
||
# Source files to be compiled. | ||
input_files = ["flipper.sol"] | ||
|
||
# Contracts to be compiled. | ||
# If no contracts are specified, solang will compile all non-virtual contracts. | ||
contracts = ["flipper"] | ||
|
||
# Specify required import paths. | ||
import_path = [] | ||
|
||
# Define any importmaps. | ||
# import_map = { "@openzeppelin" = "/home/user/libraries/openzeppelin-contracts/" } | ||
import_map = {} | ||
|
||
|
||
[target] | ||
name = "solana" # Valid targets are "solana" and "polkadot" | ||
name = "solana" | ||
|
||
[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. | ||
# Log debug prints to the environment. | ||
prints = true | ||
|
||
# Log runtime errors to the environment. | ||
log-runtime-errors = true | ||
|
||
# Add debug info to the generated llvm IR. | ||
generate-debug-info = false | ||
|
||
[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" | ||
|
||
# Valid LLVM optimization levels are: none, less, default, aggressive | ||
llvm-IR-optimization-level = "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 | ||
verbose = false | ||
|
||
# Emit compiler state at early stages. Valid options are: ast-dot, cfg, llvm-ir, llvm-bc, object, asm | ||
# emit = "llvm-ir" | ||
|
||
# Output directory for binary artifacts. | ||
# output_directory = "path/to/dir" | ||
|
||
# Output directory for the metadata. | ||
# output_meta = "path/to/dir" | ||
|
||
# Output everything in a JSON format on STDOUT instead of writing output files. | ||
std_json_output = false |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.