run-make-support: remove outdated comments
This commit is contained in:
parent
9b17c98d76
commit
ed168e7b2b
4 changed files with 0 additions and 108 deletions
|
|
@ -8,23 +8,6 @@ use crate::targets::is_msvc;
|
|||
/// Construct the static library name based on the target.
|
||||
#[must_use]
|
||||
pub fn static_lib_name(name: &str) -> String {
|
||||
// See tools.mk (irrelevant lines omitted):
|
||||
//
|
||||
// ```makefile
|
||||
// ifeq ($(UNAME),Darwin)
|
||||
// STATICLIB = $(TMPDIR)/lib$(1).a
|
||||
// else
|
||||
// ifdef IS_WINDOWS
|
||||
// ifdef IS_MSVC
|
||||
// STATICLIB = $(TMPDIR)/$(1).lib
|
||||
// else
|
||||
// STATICLIB = $(TMPDIR)/lib$(1).a
|
||||
// endif
|
||||
// else
|
||||
// STATICLIB = $(TMPDIR)/lib$(1).a
|
||||
// endif
|
||||
// endif
|
||||
// ```
|
||||
assert!(!name.contains(char::is_whitespace), "static library name cannot contain whitespace");
|
||||
|
||||
if is_msvc() { format!("{name}.lib") } else { format!("lib{name}.a") }
|
||||
|
|
|
|||
|
|
@ -80,17 +80,6 @@ impl Cc {
|
|||
|
||||
/// Specify `-o` or `-Fe`/`-Fo` depending on platform/compiler.
|
||||
pub fn out_exe(&mut self, name: &str) -> &mut Self {
|
||||
// Ref: tools.mk (irrelevant lines omitted):
|
||||
//
|
||||
// ```makefile
|
||||
// ifdef IS_MSVC
|
||||
// OUT_EXE=-Fe:`cygpath -w $(TMPDIR)/$(call BIN,$(1))` \
|
||||
// -Fo:`cygpath -w $(TMPDIR)/$(1).obj`
|
||||
// else
|
||||
// OUT_EXE=-o $(TMPDIR)/$(1)
|
||||
// endif
|
||||
// ```
|
||||
|
||||
let mut path = std::path::PathBuf::from(name);
|
||||
|
||||
if is_msvc() {
|
||||
|
|
|
|||
|
|
@ -2,36 +2,6 @@ use crate::{is_msvc, is_windows, uname};
|
|||
|
||||
/// `EXTRACFLAGS`
|
||||
pub fn extra_c_flags() -> Vec<&'static str> {
|
||||
// Adapted from tools.mk (trimmed):
|
||||
//
|
||||
// ```makefile
|
||||
// ifdef IS_WINDOWS
|
||||
// ifdef IS_MSVC
|
||||
// EXTRACFLAGS := ws2_32.lib userenv.lib advapi32.lib bcrypt.lib ntdll.lib synchronization.lib
|
||||
// else
|
||||
// EXTRACFLAGS := -lws2_32 -luserenv -lbcrypt -lntdll -lsynchronization
|
||||
// endif
|
||||
// else
|
||||
// ifeq ($(UNAME),Darwin)
|
||||
// EXTRACFLAGS := -lresolv
|
||||
// else
|
||||
// ifeq ($(UNAME),FreeBSD)
|
||||
// EXTRACFLAGS := -lm -lpthread -lgcc_s
|
||||
// else
|
||||
// ifeq ($(UNAME),SunOS)
|
||||
// EXTRACFLAGS := -lm -lpthread -lposix4 -lsocket -lresolv
|
||||
// else
|
||||
// ifeq ($(UNAME),OpenBSD)
|
||||
// EXTRACFLAGS := -lm -lpthread -lc++abi
|
||||
// else
|
||||
// EXTRACFLAGS := -lm -lrt -ldl -lpthread
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// ```
|
||||
|
||||
if is_windows() {
|
||||
if is_msvc() {
|
||||
vec![
|
||||
|
|
@ -60,31 +30,6 @@ pub fn extra_c_flags() -> Vec<&'static str> {
|
|||
|
||||
/// `EXTRACXXFLAGS`
|
||||
pub fn extra_cxx_flags() -> Vec<&'static str> {
|
||||
// Adapted from tools.mk (trimmed):
|
||||
//
|
||||
// ```makefile
|
||||
// ifdef IS_WINDOWS
|
||||
// ifdef IS_MSVC
|
||||
// else
|
||||
// EXTRACXXFLAGS := -lstdc++
|
||||
// endif
|
||||
// else
|
||||
// ifeq ($(UNAME),Darwin)
|
||||
// EXTRACXXFLAGS := -lc++
|
||||
// else
|
||||
// ifeq ($(UNAME),FreeBSD)
|
||||
// else
|
||||
// ifeq ($(UNAME),SunOS)
|
||||
// else
|
||||
// ifeq ($(UNAME),OpenBSD)
|
||||
// else
|
||||
// EXTRACXXFLAGS := -lstdc++
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// ```
|
||||
if is_windows() {
|
||||
if is_msvc() { vec![] } else { vec!["-lstdc++"] }
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -365,31 +365,6 @@ impl Rustc {
|
|||
|
||||
/// `EXTRARSCXXFLAGS`
|
||||
pub fn extra_rs_cxx_flags(&mut self) -> &mut Self {
|
||||
// Adapted from tools.mk (trimmed):
|
||||
//
|
||||
// ```makefile
|
||||
// ifdef IS_WINDOWS
|
||||
// ifdef IS_MSVC
|
||||
// else
|
||||
// EXTRARSCXXFLAGS := -lstatic:-bundle=stdc++
|
||||
// endif
|
||||
// else
|
||||
// ifeq ($(UNAME),Darwin)
|
||||
// EXTRARSCXXFLAGS := -lc++
|
||||
// else
|
||||
// ifeq ($(UNAME),FreeBSD)
|
||||
// else
|
||||
// ifeq ($(UNAME),SunOS)
|
||||
// else
|
||||
// ifeq ($(UNAME),OpenBSD)
|
||||
// else
|
||||
// EXTRARSCXXFLAGS := -lstdc++
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// endif
|
||||
// ```
|
||||
if is_windows() {
|
||||
// So this is a bit hacky: we can't use the DLL version of libstdc++ because
|
||||
// it pulls in the DLL version of libgcc, which means that we end up with 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue