about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Readme.md2
-rw-r--r--src/gcc_util.rs5
2 files changed, 3 insertions, 4 deletions
diff --git a/Readme.md b/Readme.md
index 1666cbc4f75..060f7c0326d 100644
--- a/Readme.md
+++ b/Readme.md
@@ -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
diff --git a/src/gcc_util.rs b/src/gcc_util.rs
index fc992ec6d2a..18343d58c35 100644
--- a/src/gcc_util.rs
+++ b/src/gcc_util.rs
@@ -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
@@ -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
@@ -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 };