Skip to content
Snippets Groups Projects

gn_base.bbclass: Refine build directory check

All threads resolved!
@@ -52,7 +52,7 @@ EXPORT_FUNCTIONS do_configure do_compile do_install
python do_check_B_is_not_S() {
bpath = os.path.abspath(d.expand("${B}"))
spath = os.path.abspath(d.expand("${S}"))
if os.path.abspath(d.expand("${S}")) == os.path.abspath(d.expand("${B}")):
if os.path.samefile(bpath, spath):
bb.fatal('''
GN requires build and sources directories to be different. By default build
directory is set to ${WORKDIR}/out. If you're using devtool remember to use
@@ -82,7 +82,7 @@ def gn_target_arch_name(d):
"""Returns a GN architecture name corresponding to the target machine's
architecture."""
name = d.getVar("GN_TARGET_ARCH_NAME")
if name is None:
if not name:
bb.fatal('Unsupported target architecture. A valid override for the '
'GN_TARGET_ARCH_NAME variable could not be found.')
return name
Loading