public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Pete Batard <pete@akeo.ie>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH v2 0/6] Add ARM support for VS2017
Date: Thu, 7 Dec 2017 15:56:07 +0000	[thread overview]
Message-ID: <111a956e-9cff-0324-121f-4a75a2d569fc@akeo.ie> (raw)
In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18BA51@SHSMSX104.ccr.corp.intel.com>

Hi Liming,

On 2017.12.07 03:02, Gao, Liming wrote:
>    This is the base step to enable VS2017 ARM tool chain. Then, user could use it and build ARM application first.

Yes.

>    Here, I have one question. VS2017 ARM requires 4096 alignment. So, why not add /FILEALIGN:4096 into tools_def.txt as the default linker option for ARM?

I don't think we want to do that on account that this option does not 
need to be specified when building regular applications, and is 
currently only needed when building the QEMU firmware.

So it's probably better to only specify it in the context where it is 
needed, rather than globally, especially as the documentation for 
/FILEALIGN [1] indicates that "By default, the linker does not use a 
fixed alignment size" which would tend to indicate that we might be 
better off letting the compiler decide what it should use on its own.

Especially, forcing /FILEALIGN to 4K everywhere does appear to increase 
the size of the generated binaries. For instance, I'm seeing a RELEASE 
Shell.efi  with a size of 762 KB without /FILEALIGN, vs. 792 KB with 
/FILEALIGN:4096.

Thus, I think we should be conservative with regards to the global 
compiler options we add: if an option only seems to be needed for a 
single module (and especially, if that module has not yet been patched 
and reviewed for compilation), it should probably be specified for that 
module alone.

As such, unless you or other people on this list have a strong opinion 
that /FILEALIGN:4096 should be global, I am currently not planning to 
resubmit a new patch that adds that option.

Please let me know if you still think the patch should be altered.

Regards,

/Pete

[1] https://docs.microsoft.com/en-gb/cpp/build/reference/filealign


  reply	other threads:[~2017-12-07 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 11:15 [PATCH v2 0/6] Add ARM support for VS2017 Pete Batard
2017-12-06 11:15 ` [PATCH v2 1/6] MdePkg: Disable some Level 4 warnings for VS2017/ARM Pete Batard
2017-12-06 11:15 ` [PATCH v2 2/6] MdePkg/Library/BaseStackCheckLib: Add Null handler " Pete Batard
2017-12-06 11:15 ` [PATCH v2 3/6] MdePkg/Library/BaseLib: Enable VS2017/ARM builds Pete Batard
2017-12-06 11:15 ` [PATCH v2 4/6] ArmPkg/Library/CompilerIntrinsicsLib: " Pete Batard
2017-12-06 11:15 ` [PATCH v2 5/6] MdePkg/Include: Add VA list support for VS2017/ARM Pete Batard
2017-12-06 11:15 ` [PATCH v2 6/6] BaseTools/Conf: Add VS2017/ARM support Pete Batard
2017-12-07  3:02 ` [PATCH v2 0/6] Add ARM support for VS2017 Gao, Liming
2017-12-07 15:56   ` Pete Batard [this message]
2017-12-08  7:01     ` 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=111a956e-9cff-0324-121f-4a75a2d569fc@akeo.ie \
    --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