Skip to content

Commit f3b82df

Browse files
committed
Add note to readme
1 parent 44b9c75 commit f3b82df

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ $ LIBRARY_PATH=$(cat gcc_path) LD_LIBRARY_PATH=$(cat gcc_path) rustc +$(cat $CG_
111111
object files when their content should have been changed by a change to cg_gccjit.</dd>
112112
<dt>CG_GCCJIT_DISPLAY_CG_TIME</dt>
113113
<dd>Display the time it took to perform codegen for a crate</dd>
114+
<dt>CG_RUSTFLAGS</dt>
115+
<dd>Send additional flags to rustc. Can be used to build the sysroot without unwinding by setting `CG_RUSTFLAGS=-Cpanic=abort`.</dd>
114116
</dl>
115117

116118
## Licensing

src/gcc_util.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
2222
// * function specific features.
2323
//
2424
// [^1]: target-cpu=native is handled here, other target-cpu values are handled implicitly
25-
// through GCC TargetMachine implementation.
25+
// through GCC march implementation.
2626
//
2727
// FIXME(nagisa): it isn't clear what's the best interaction between features implied by
2828
// `-Ctarget-cpu` and `--target` are. On one hand, you'd expect CLI arguments to always
@@ -33,8 +33,6 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
3333
// should be taken in cases like these.
3434
let mut features = vec![];
3535

36-
// TODO(antoyo): -Ctarget-cpu=native
37-
3836
// Features implied by an implicit or explicit `--target`.
3937
features.extend(
4038
sess.target
@@ -144,7 +142,6 @@ fn backend_feature_name(s: &str) -> Option<&str> {
144142
Some(feature)
145143
}
146144

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

0 commit comments

Comments
 (0)