mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
documentation
This commit is contained in:
parent
0c5d892dba
commit
02161b29b8
@ -71,6 +71,15 @@ and then run the compiler as
|
|||||||
|
|
||||||
`solc github.com/ethereum/dapp-bin/=/usr/local/dapp-bin/ source.sol`
|
`solc github.com/ethereum/dapp-bin/=/usr/local/dapp-bin/ source.sol`
|
||||||
|
|
||||||
|
Note that solc only allows you to include files from certain directories:
|
||||||
|
They have to be in the directory (or subdirectory) of one of the explicitly
|
||||||
|
specified source files or in the directory (or subdirectory) of a remapping
|
||||||
|
target. If you want to allow direct absolute includes, just add the
|
||||||
|
remapping `=/`.
|
||||||
|
|
||||||
|
If there are multiple remappings that lead to a valid file, the remapping
|
||||||
|
with the longest common prefix is chosen.
|
||||||
|
|
||||||
**browser-solidity**:
|
**browser-solidity**:
|
||||||
|
|
||||||
The `browser-based compiler <https://chriseth.github.io/browser-solidity>`_
|
The `browser-based compiler <https://chriseth.github.io/browser-solidity>`_
|
||||||
|
@ -111,8 +111,11 @@ it is also possible to provide path redirects using `prefix=path` in the followi
|
|||||||
This essentially instructs the compiler to search for anything starting with
|
This essentially instructs the compiler to search for anything starting with
|
||||||
`github.com/ethereum/dapp-bin/` under `/usr/local/lib/dapp-bin` and if it does not
|
`github.com/ethereum/dapp-bin/` under `/usr/local/lib/dapp-bin` and if it does not
|
||||||
find the file there, it will look at `/usr/local/lib/fallback` (the empty prefix
|
find the file there, it will look at `/usr/local/lib/fallback` (the empty prefix
|
||||||
always matches) and if also that fails, it will make a full path lookup
|
always matches). `solc` will not read files from the filesystem that lie outside of
|
||||||
on the filesystem.
|
the remapping targets and outside of the directories where explicitly specified source
|
||||||
|
files reside, so things like `import "/etc/passwd";` only work if you add `=/` as a remapping.
|
||||||
|
|
||||||
|
If there are multiple matches due to remappings, the one with the longest common prefix is selected.
|
||||||
|
|
||||||
If your contracts use [libraries](#libraries), you will notice that the bytecode contains substrings of the form `__LibraryName______`. You can use `solc` as a linker meaning that it will insert the library addresses for you at those points:
|
If your contracts use [libraries](#libraries), you will notice that the bytecode contains substrings of the form `__LibraryName______`. You can use `solc` as a linker meaning that it will insert the library addresses for you at those points:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user