Skip to content
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

Add compile_info option to compile #1558

Merged
merged 1 commit into from
Sep 15, 2017
Merged

Conversation

josevalim
Copy link
Contributor

This allows compilers built on top of the compile module
to attach external compilation metadata to the compile_info
chunk.

For example, Erlang uses this chunk to store the compiler
version. Elixir and LFE may augment this by also adding
their own compiler versions, which can be useful when
debugging.

The deterministic option does not affect the user supplied
compile_info. It is therefore the responsibility of external
compilers to guarantee any added information does not violate
the determinsitic option, if such option is supported.

Finally, this code moves the building of the compile_info
options to the compile module instead of beam_asm, moving
all of the option mangling code to a single place.

@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Sep 4, 2017
@bjorng bjorng added the feature label Sep 14, 2017
@bjorng
Copy link
Contributor

bjorng commented Sep 14, 2017

Looks good!

I have just one nitpick. I don't like and; I prefer ,. I have pushed a fixup commit.

@bjorng bjorng self-assigned this Sep 14, 2017
This allows compilers built on top of the compile module
to attach external compilation metadata to the compile_info
chunk.

For example, Erlang uses this chunk to store the compiler
version. Elixir and LFE may augment this by also adding
their own compiler versions, which can be useful when
debugging.

The deterministic option does not affect the user supplied
compile_info. It is therefore the responsibility of external
compilers to guarantee any added information does not violate
the determinsitic option, if such option is supported.

Finally, this code moves the building of the compile_info
options to the compile module instead of beam_asm, moving
all of the option mangling code to a single place.
@josevalim
Copy link
Contributor Author

Good catch. Squashed and force pushed.

@bjorng bjorng added the testing currently being tested, tag is used by OTP internal CI label Sep 14, 2017
@bjorng
Copy link
Contributor

bjorng commented Sep 14, 2017

Added to our daily builds.

@bjorng bjorng merged commit 482120c into erlang:master Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants