Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: fusl/BUILD.gn

Issue 1596483004: [fusl] Build libcxx atop fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Finish c++ bits Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | fusl/test/vector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Define the sysroot directory. 5 # Define the sysroot directory.
6 sysroot = "$root_out_dir/sysroot" 6 sysroot = "$root_out_dir/sysroot"
7 7
8 config("fusl_config") { 8 config("fusl_config") {
9 cflags = [ 9 cflags = [
10 # Flags from musl 10 # Flags from musl
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 "$target/libgcc.a", 1638 "$target/libgcc.a",
1639 "$target/libgcc_eh.a", 1639 "$target/libgcc_eh.a",
1640 "$target/libgcc_s.so", 1640 "$target/libgcc_s.so",
1641 ] 1641 ]
1642 1642
1643 deps = [ 1643 deps = [
1644 ":copy_sysroot", 1644 ":copy_sysroot",
1645 ] 1645 ]
1646 } 1646 }
1647 1647
1648 copy("copy_libcxx") {
1649 sources = [
1650 "${target_out_dir}/../third_party/libcxx/libcxx.a",
1651 ]
1652 outputs = [
1653 "${sysroot_lib_dir}/libc++.a",
1654 ]
1655 deps = [
1656 "//third_party/libcxx:libcxx",
1657 ]
1658 }
1659
1660 copy("copy_libcxxabi") {
1661 sources = [
1662 "${target_out_dir}/../third_party/libcxx/libcxxabi.a",
1663 ]
1664 outputs = [
1665 "${sysroot_lib_dir}/libc++abi.a",
1666 ]
1667 deps = [
1668 "//third_party/libcxx:libcxxabi",
1669 ]
1670 }
1671
1672 action("copy_libcxx_headers") {
1673 script = "tools/copy_libcxx_headers.py"
1674
1675 deps = [
1676 ":copy_sysroot",
1677 ]
1678
1679 source_dir = "//third_party/libcxx/libcxx/include"
1680
1681 # Annoyingly, this has to be ".../c++/v1" for clang to automatically
1682 # add it to the includes.
1683 target_dir = "${sysroot_include_dir}/c++/v1"
1684
1685 args = [
1686 rebase_path(source_dir),
1687 rebase_path(target_dir),
1688 ]
1689
1690 outputs = [
1691 "${target_dir}/__bit_reference",
1692 "${target_dir}/__config",
1693 "${target_dir}/__config_site.in",
1694 "${target_dir}/__debug",
1695 "${target_dir}/__functional_03",
1696 "${target_dir}/__functional_base",
1697 "${target_dir}/__functional_base_03",
1698 "${target_dir}/__hash_table",
1699 "${target_dir}/__locale",
1700 "${target_dir}/__mutex_base",
1701 "${target_dir}/__nullptr",
1702 "${target_dir}/__refstring",
1703 "${target_dir}/__split_buffer",
1704 "${target_dir}/__sso_allocator",
1705 "${target_dir}/__std_stream",
1706 "${target_dir}/__tree",
1707 "${target_dir}/__tuple",
1708 "${target_dir}/__undef___deallocate",
1709 "${target_dir}/__undef_min_max",
1710 "${target_dir}/algorithm",
1711 "${target_dir}/array",
1712 "${target_dir}/atomic",
1713 "${target_dir}/bitset",
1714 "${target_dir}/cassert",
1715 "${target_dir}/ccomplex",
1716 "${target_dir}/cctype",
1717 "${target_dir}/cerrno",
1718 "${target_dir}/cfenv",
1719 "${target_dir}/cfloat",
1720 "${target_dir}/chrono",
1721 "${target_dir}/cinttypes",
1722 "${target_dir}/ciso646",
1723 "${target_dir}/climits",
1724 "${target_dir}/clocale",
1725 "${target_dir}/cmath",
1726 "${target_dir}/codecvt",
1727 "${target_dir}/complex",
1728 "${target_dir}/complex.h",
1729 "${target_dir}/condition_variable",
1730 "${target_dir}/csetjmp",
1731 "${target_dir}/csignal",
1732 "${target_dir}/cstdarg",
1733 "${target_dir}/cstdbool",
1734 "${target_dir}/cstddef",
1735 "${target_dir}/cstdint",
1736 "${target_dir}/cstdio",
1737 "${target_dir}/cstdlib",
1738 "${target_dir}/cstring",
1739 "${target_dir}/ctgmath",
1740 "${target_dir}/ctime",
1741 "${target_dir}/ctype.h",
1742 "${target_dir}/cwchar",
1743 "${target_dir}/cwctype",
1744 "${target_dir}/deque",
1745 "${target_dir}/errno.h",
1746 "${target_dir}/exception",
1747 "${target_dir}/experimental/__config",
1748 "${target_dir}/experimental/algorithm",
1749 "${target_dir}/experimental/any",
1750 "${target_dir}/experimental/chrono",
1751 "${target_dir}/experimental/dynarray",
1752 "${target_dir}/experimental/functional",
1753 "${target_dir}/experimental/optional",
1754 "${target_dir}/experimental/ratio",
1755 "${target_dir}/experimental/string_view",
1756 "${target_dir}/experimental/system_error",
1757 "${target_dir}/experimental/tuple",
1758 "${target_dir}/experimental/type_traits",
1759 "${target_dir}/experimental/utility",
1760 "${target_dir}/ext/__hash",
1761 "${target_dir}/ext/hash_map",
1762 "${target_dir}/ext/hash_set",
1763 "${target_dir}/float.h",
1764 "${target_dir}/forward_list",
1765 "${target_dir}/fstream",
1766 "${target_dir}/functional",
1767 "${target_dir}/future",
1768 "${target_dir}/initializer_list",
1769 "${target_dir}/inttypes.h",
1770 "${target_dir}/iomanip",
1771 "${target_dir}/ios",
1772 "${target_dir}/iosfwd",
1773 "${target_dir}/iostream",
1774 "${target_dir}/istream",
1775 "${target_dir}/iterator",
1776 "${target_dir}/limits",
1777 "${target_dir}/list",
1778 "${target_dir}/locale",
1779 "${target_dir}/map",
1780 "${target_dir}/math.h",
1781 "${target_dir}/memory",
1782 "${target_dir}/module.modulemap",
1783 "${target_dir}/mutex",
1784 "${target_dir}/new",
1785 "${target_dir}/numeric",
1786 "${target_dir}/ostream",
1787 "${target_dir}/queue",
1788 "${target_dir}/random",
1789 "${target_dir}/ratio",
1790 "${target_dir}/regex",
1791 "${target_dir}/scoped_allocator",
1792 "${target_dir}/set",
1793 "${target_dir}/setjmp.h",
1794 "${target_dir}/shared_mutex",
1795 "${target_dir}/sstream",
1796 "${target_dir}/stack",
1797 "${target_dir}/stddef.h",
1798 "${target_dir}/stdexcept",
1799 "${target_dir}/stdio.h",
1800 "${target_dir}/stdlib.h",
1801 "${target_dir}/streambuf",
1802 "${target_dir}/string",
1803 "${target_dir}/strstream",
1804 "${target_dir}/support/android/locale_bionic.h",
1805 "${target_dir}/support/ibm/limits.h",
1806 "${target_dir}/support/ibm/support.h",
1807 "${target_dir}/support/ibm/xlocale.h",
1808 "${target_dir}/support/musl/xlocale.h",
1809 "${target_dir}/support/newlib/xlocale.h",
1810 "${target_dir}/support/solaris/floatingpoint.h",
1811 "${target_dir}/support/solaris/wchar.h",
1812 "${target_dir}/support/solaris/xlocale.h",
1813 "${target_dir}/support/win32/limits_win32.h",
1814 "${target_dir}/support/win32/locale_win32.h",
1815 "${target_dir}/support/win32/math_win32.h",
1816 "${target_dir}/support/win32/support.h",
1817 "${target_dir}/support/xlocale/xlocale.h",
1818 "${target_dir}/system_error",
1819 "${target_dir}/tgmath.h",
1820 "${target_dir}/thread",
1821 "${target_dir}/tuple",
1822 "${target_dir}/type_traits",
1823 "${target_dir}/typeindex",
1824 "${target_dir}/typeinfo",
1825 "${target_dir}/unordered_map",
1826 "${target_dir}/unordered_set",
1827 "${target_dir}/utility",
1828 "${target_dir}/valarray",
1829 "${target_dir}/vector",
1830 "${target_dir}/wchar.h",
1831 "${target_dir}/wctype.h",
1832 ]
1833 }
1834
1648 config("sysroot_config") { 1835 config("sysroot_config") {
1649 rebased_sysroot = rebase_path(sysroot) 1836 rebased_sysroot = rebase_path(sysroot)
1650 1837
1651 cflags = [ 1838 cflags = [
1652 "--sysroot=$rebased_sysroot", 1839 "--sysroot=$rebased_sysroot",
1653 "-fPIC", 1840 "-fPIC",
1654 "-static", 1841 "-static",
1655 ] 1842 ]
1656 1843
1844 cflags_cc = [
1845 # This is necessary for clang to get the search paths right.
1846 "-stdlib=libc++",
1847 ]
1848
1657 ldflags = [ 1849 ldflags = [
1658 "--sysroot=$rebased_sysroot", 1850 "--sysroot=$rebased_sysroot",
1659 "-static", 1851 "-static",
1852 "-stdlib=libc++",
1660 ] 1853 ]
1661 } 1854 }
1662 1855
1663 executable("empty_main") { 1856 executable("empty_main") {
1664 configs = [] 1857 configs = []
1665 configs += [ ":sysroot_config" ] 1858 configs += [ ":sysroot_config" ]
1666 1859
1667 sources = [ 1860 sources = [
1668 "test/empty_main.c", 1861 "test/empty_main.c",
1669 ] 1862 ]
1670 1863
1671 deps = [ 1864 deps = [
1672 ":finish_sysroot", 1865 ":finish_sysroot",
1673 ] 1866 ]
1674 } 1867 }
1675 1868
1869 executable("vector") {
Petr Hosek 2016/02/04 01:05:10 If this is a test, it should probably be a `test`
1870 configs = []
1871 configs += [ ":sysroot_config" ]
1872
1873 sources = [
1874 "test/vector.cc",
1875 ]
1876
1877 deps = [
1878 ":copy_libcxx",
1879 ":copy_libcxx_headers",
1880 ":copy_libcxxabi",
1881 ]
1882
1883 libs = [
1884 "c++abi",
1885 "c++",
1886 ]
1887 }
1888
1676 group("fusl") { 1889 group("fusl") {
1677 deps = [ 1890 deps = [
1678 ":crt(//build/toolchain/fusl:fusl_$current_cpu)", 1891 ":crt(//build/toolchain/fusl:fusl_$current_cpu)",
1679 ":empty_main(//build/toolchain/fusl:fusl_$current_cpu)", 1892 ":empty_main(//build/toolchain/fusl:fusl_$current_cpu)",
1680 ":finish_sysroot(//build/toolchain/fusl:fusl_$current_cpu)", 1893 ":finish_sysroot(//build/toolchain/fusl:fusl_$current_cpu)",
1681 ":libc(//build/toolchain/fusl:fusl_$current_cpu)", 1894 ":libc(//build/toolchain/fusl:fusl_$current_cpu)",
1895 ":vector(//build/toolchain/fusl:fusl_$current_cpu)",
1896 "//third_party/libcxx:libcxx(//build/toolchain/fusl:fusl_$current_cpu)",
1897 "//third_party/libcxx:libcxxabi(//build/toolchain/fusl:fusl_$current_cpu)",
1682 ] 1898 ]
1683 } 1899 }
OLDNEW
« no previous file with comments | « no previous file | fusl/test/vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698