1# gn-native contains the GN binary used to configure Chromium. 2# It is not released separately, and each Chromium release is only expected to 3# work with the GN version provided with it. 4 5require chromium.inc 6 7inherit native 8 9S = "${WORKDIR}/chromium-${PV}" 10 11# bootstrap.py --no_clean hardcodes the build location to out_bootstrap. 12# Omitting --no_clean causes the script to create a temporary directory with a 13# random name outside the build directory, so we choose the lesser of the two 14# evils. 15B = "${S}/out_bootstrap" 16 17SRC_URI += " \ 18 file://0001-Pass-no-static-libstdc-to-gen.py.patch \ 19" 20 21# The build system expects the linker to be invoked via the compiler. If we use 22# the default value for BUILD_LD, it will fail because it does not recognize 23# some of the arguments passed to it. 24BUILD_LD = "${CXX}" 25 26# Use LLVM's ar rather than binutils'. Depending on the optimizations enabled 27# in the build ar(1) may not be enough. 28BUILD_AR = "llvm-ar" 29 30DEPENDS = "clang-native ninja-native" 31DEPENDS:append:runtime-llvm = " compiler-rt-native libcxx-native" 32# Use libcxx headers for native parts 33CXXFLAGS:append:runtime-llvm = " -isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++" 34# Use libgcc for native parts 35LDFLAGS:append:runtime-llvm = " -rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}" 36 37do_configure[noexec] = "1" 38 39do_compile() { 40 python3 ${S}/tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles 41} 42 43do_install() { 44 install -d ${D}${bindir} 45 install -m 0755 ${S}/out/Release/gn ${D}${bindir}/gn 46} 47 48INSANE_SKIP:${PN} += "already-stripped" 49