public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: edk2-devel@lists.01.org
Cc: Bob Feng <bob.c.feng@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: BaseTools: handling of $(ARCH) in .dsc/.fdf when multiple -a specified
Date: Mon, 4 Feb 2019 18:31:41 +0000	[thread overview]
Message-ID: <20190204183141.bv2z5u4w7cuyo77b@bivouac.eciton.net> (raw)

Hi Bob, Liming,

So, I've been playing around with merging the .dsc/.fdf files in
OvmfPkg. Merging IA32 and X64 is simple enough, since you can test on

!if $(ARCH) == "X64"

However, from what I can tell, when trying to merge in the
OvmfPkgIa32X64 platform - what you actually end up with in $(ARCH)
when specifying multiple -a is a python list rather than a single
string.

To explain the problem in code, tryin to build the platform described by

---
[Defines]
  PLATFORM_NAME                  = Ovmf
  PLATFORM_GUID                  = 5a9e7754-d81b-49ea-85ad-69eaa7b1539b
  PLATFORM_VERSION               = 0.1
  DSC_SPECIFICATION              = 0x00010005
  SUPPORTED_ARCHITECTURES        = IA32|X64
  BUILD_TARGETS                  = DEBUG|NOOPT|RELEASE
!if "$(ARCH)" == "IA32 X64" or "$(ARCH)" == "X64 IA32"
  OUTPUT_DIRECTORY               = Build/OvmfDummy
!else
  OUTPUT_DIRECTORY               = Build/Ovmf$(ARCH)Real
!endif
---

using the command line 'build -t GCC5 -a IA32 -a X64 -b DEBUG -p Test.dsc'
inevitably results in an output like

---
Build environment: Linux-4.9.0-3-amd64-x86_64-with-debian-9.7
Build start time: 18:21:33, Feb.04 2019

WORKSPACE        = /work/git/edk2
EDK_TOOLS_PATH   = /work/git/edk2/BaseTools
CONF_PATH        = /work/git/edk2/Conf
PYTHON_COMMAND   = /usr/bin/python3.5



build.py...
/work/git/edk2/Test.dsc(11): error 3001: No space is allowed in
OUTPUT_DIRECTORY
	Build/OvmfIA32 X64Real

- Failed -
---

Now, the Ia32X64 target is very much of a special case, which I don't
necessarily see as usefully supported by the current .dsc
specification. But I believe we need to do one of
- banning (simultaneous) multi-architecture platforms
- treating them the same as multi-target (-b) builds (build them separately)
- have a defined way of handling them

So, am I missing something, or does this require a change in
BaseTools?

Best Regards,

Leif


             reply	other threads:[~2019-02-04 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 18:31 Leif Lindholm [this message]
2019-02-04 19:02 ` BaseTools: handling of $(ARCH) in .dsc/.fdf when multiple -a specified Laszlo Ersek
2019-02-05 11:08   ` Leif Lindholm
2019-02-05 11:35     ` Laszlo Ersek
2019-02-11 15:51       ` Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204183141.bv2z5u4w7cuyo77b@bivouac.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox