Commit 3c3bf76
committed
Declare
On targets with `default_hidden_visibility` set, which is currrently
just WebAssembly, declare the generated `main` function with visibility
hidden. This makes it consistent with clang's WebAssembly target, where
`main` is just a user function that gets the same visibility as any
other user function, which is hidden on WebAssembly unless explicitly
overridden.
This will help simplify use cases which in the future may want to
automatically wasm-export all visibility-"default" symbols. `main` isn't
intended to be wasm-exported, and marking it hidden prevents it from
being wasm-exported in that scenario.main as visibility hidden on targets that default to hidden.1 parent 09ae784 commit 3c3bf76
File tree
5 files changed
+46
-9
lines changed- compiler/rustc_codegen_llvm/src
- llvm
5 files changed
+46
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1458 | 1458 | | |
1459 | 1459 | | |
1460 | 1460 | | |
1461 | | - | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1462 | 1467 | | |
1463 | 1468 | | |
1464 | 1469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
532 | 537 | | |
533 | 538 | | |
534 | 539 | | |
| |||
585 | 590 | | |
586 | 591 | | |
587 | 592 | | |
588 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
589 | 600 | | |
590 | 601 | | |
591 | 602 | | |
| |||
615 | 626 | | |
616 | 627 | | |
617 | 628 | | |
618 | | - | |
| 629 | + | |
619 | 630 | | |
620 | 631 | | |
621 | 632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
1219 | | - | |
| 1219 | + | |
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | | - | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1420 | 1425 | | |
1421 | 1426 | | |
1422 | 1427 | | |
| |||
1542 | 1547 | | |
1543 | 1548 | | |
1544 | 1549 | | |
1545 | | - | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
1546 | 1556 | | |
1547 | 1557 | | |
1548 | 1558 | | |
| |||
1991 | 2001 | | |
1992 | 2002 | | |
1993 | 2003 | | |
1994 | | - | |
| 2004 | + | |
| 2005 | + | |
1995 | 2006 | | |
1996 | 2007 | | |
1997 | 2008 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
| |||
0 commit comments