Skip to content

Commit

Permalink
Add note to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Sep 15, 2023
1 parent 44b9c75 commit f3b82df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ $ LIBRARY_PATH=$(cat gcc_path) LD_LIBRARY_PATH=$(cat gcc_path) rustc +$(cat $CG_
object files when their content should have been changed by a change to cg_gccjit.</dd>
<dt>CG_GCCJIT_DISPLAY_CG_TIME</dt>
<dd>Display the time it took to perform codegen for a crate</dd>
<dt>CG_RUSTFLAGS</dt>
<dd>Send additional flags to rustc. Can be used to build the sysroot without unwinding by setting `CG_RUSTFLAGS=-Cpanic=abort`.</dd>
</dl>

## Licensing
Expand Down
5 changes: 1 addition & 4 deletions src/gcc_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
// * function specific features.
//
// [^1]: target-cpu=native is handled here, other target-cpu values are handled implicitly
// through GCC TargetMachine implementation.
// through GCC march implementation.
//
// FIXME(nagisa): it isn't clear what's the best interaction between features implied by
// `-Ctarget-cpu` and `--target` are. On one hand, you'd expect CLI arguments to always
Expand All @@ -33,8 +33,6 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
// should be taken in cases like these.
let mut features = vec![];

// TODO(antoyo): -Ctarget-cpu=native

// Features implied by an implicit or explicit `--target`.
features.extend(
sess.target
Expand Down Expand Up @@ -144,7 +142,6 @@ fn backend_feature_name(s: &str) -> Option<&str> {
Some(feature)
}

// TODO(antoyo): maybe move to a new module gcc_util.
// To find a list of GCC's names, check https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
pub fn to_gcc_features<'a>(sess: &Session, s: &'a str) -> SmallVec<[&'a str; 2]> {
let arch = if sess.target.arch == "x86_64" { "x86" } else { &*sess.target.arch };
Expand Down

0 comments on commit f3b82df

Please sign in to comment.