Skip to content

Commit cb24a10

Browse files
committed
---
yaml --- r: 207335 b: refs/heads/master c: d97b4af h: refs/heads/master i: 207333: 688a041 207331: 896e512 207327: a7c3233 v: v3
1 parent 0cccfa4 commit cb24a10

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: af56e2efde5cd82564e32598889d25d798c02722
2+
refs/heads/master: d97b4af15353c488ddd48a7e208906f84f7654c5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 857ef6e272e5634cb9f3e6ee50eb6bc2a2e71651
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f

trunk/src/etc/mklldeps.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ def run(args):
8080
assert('stdlib=libc++' not in out)
8181
f.write("#[link(name = \"stdc++\", kind = \"static\")]\n")
8282
else:
83+
# Note that we use `cfg_attr` here because on MSVC the C++ standard library
84+
# is not c++ or stdc++, but rather the linker takes care of linking the
85+
# right standard library.
8386
if 'stdlib=libc++' in out:
84-
f.write("#[link(name = \"c++\")]\n")
87+
f.write("#[cfg_attr(not(target_env = \"msvc\"), link(name = \"c++\"))]\n")
8588
else:
86-
f.write("#[link(name = \"stdc++\")]\n")
89+
f.write("#[cfg_attr(not(target_env = \"msvc\"), link(name = \"stdc++\"))]\n")
8790

8891
# Attach everything to an extern block
8992
f.write("extern {}\n")

0 commit comments

Comments
 (0)