简体   繁体   English

如何确定Borland对于RTL和VCL .dcu文件的原始编译器选项?

[英]How to determine Borland's original compiler options for RTL and VCL .dcu files?

Background: as D7 is now officially unsupported, I'm trying to create a definitive stable and fast D7 Pro development environment, with all fixes applied directly to the source code instead of complicated patching or adding units to every project. 背景:由于现在正式不支持D7,所以我试图创建一个确定的,稳定,快速的D7 Pro开发环境,将所有修补程序直接应用于源代码,而不是对每个项目进行复杂的修补或添加单元。

Borland did provide a makefile for the RTL dcu files, but even that does not produce the same size files as the official ones. Borland确实为RTL dcu文件提供了一个makefile,但即使这样,其生成的文件大小也不与官方文件相同。

I'm wondering whether something is wrong with my setup. 我想知道我的设置是否有问题。 As an aside, what is the recommended way of creating the initial development environment now? 顺便说一句,现在推荐的创建初始开发环境的方法是什么? I thought the best option would be to start afresh by downloading D7Pro and the update 7.1 from cc.embarcadero.com. 我认为最好的选择是从cc.embarcadero.com下载D7Pro和7.1更新来重新开始。

To the very best of my knowledge, the VCL is expected to be compiled with default compiler settings. 据我所知,应该使用默认的编译器设置来编译VCL。 Any variations to that are specified explicitly in the source code. 在源代码中明确指定了对此的任何变体。

Of course there are debug and release versions. 当然,有调试和发行版本。 The former does not have optimizations enabled, the latter does. 前者未启用优化,而后者则启用。

There are some special requirements for the very low level RTL units but judging from what you say in the question, you are on top of that. 对于非常低级的RTL单元有一些特殊要求,但是从您在问题中所说的来看,您是最重要的。

You are concerned that you will encounter the unit compiled against different version of XXX errors. 您担心会遇到针对不同版本的XXX错误编译单元 But that will not occur since, as I understand it, you will be compiling the entire RTL and VCL. 但这不会发生,因为据我了解,您将编译整个RTL和VCL。

Even if you re-compile piecemeal just the units that you modify, you will have no problems so long as you use default compiler options. 即使仅逐个重新编译您修改的单元,只要使用默认的编译器选项,您就不会有问题。 Of course, you would have to refrain from making changes to the interface section of any unit in that case. 当然,在这种情况下,您必须避免对任何单元的接口部分进行更改。

And even if you compile piecemeal you have to understand that there are some compiler options that have no influence on whether or not the .dcu files are compatible with others. 而且,即使您是逐行编译的,也必须了解有些编译器选项对.dcu文件是否与其他文件不兼容没有影响。 A good example is optimisation. 一个很好的例子就是优化。

I do wonder whether or not you are doing this needlessly. 我确实想知道您是否在不必要地这样做。 It sounds like you have a working solution. 听起来您有一个可行的解决方案。 And nothing has changed recently. 最近没有任何变化。 Delphi 7 updates dried up a decade ago. 十年前,Delphi 7更新干dried了。 Why do you feel compelled to change now? 您为什么现在感到必须改变?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM