Слияние кода завершено, страница обновится автоматически
# -*- mode: shell-script -*-
#
# FPC configuration file for Castle Game Engine.
#
# ------------------------------------------------------------------------
# When it is used?
#
# This file is only used in special compilation methods:
# - When compiling the build tool itself, using
# tools/build-tool/castle-engine_compile.sh
# tools/build-tool/castle-engine_compile.ps1
# - When using fpmake to build the engine
#
# Above are *not recommended* compilation methods for Castle Game Engine.
# Instead we recommend to build using:
# - Castle Game Engine editor https://castle-engine.io/editor
# - Castle Game Engine command-line build tool https://castle-engine.io/build_tool
# - Lazarus IDE
# - Delphi IDE
# Above compilation methods don't use this file.
# They call the compilers (like FPC or Delphi) with proper parameters under
# the hoood.
#
# ------------------------------------------------------------------------
# What does this define?
#
# Pretty much normal configuration for people that like modern ObjectPascal
# and ObjFpc mode.
#
# Accepts two switches: DEBUG and RELEASE. If you don't define any of them
# debug and optimizing code will be done according to compiler defaults.
# Never define both of them.
#
# Accepts a switch CASTLE_ENGINE_PATHS_ALREADY_DEFINED:
# in this case we will assume that proper -Fu and -Fi, to provide
# paths for FPC to our units, have already been defined.
# This allows to call FPC from any directory (otherwise you have to call
# FPC from this directory, containing castle-fpc.cfg, to make relative paths
# here work).
# output options -------------------------------------------------------------
# Show FPC logo (shows fpc version)
-l
# Show warnings + notes.
# Do not show hints (there are too many useless hints produced by FPC).
-vwn
# Input/output checks always, even in release version.
# Some code may depend on the fact that IO errors in standard Pascal
# functions are checked automatically (and raise exceptions
# if SysUtils is compiled in). Although 99% of code should use TStream
# instead of old Pascal IO, and then this switch doesn't matter.
-Ci
# do not show Warning: (2045) APPTYPE is not supported by the target OS
-vm2045
# do not show Hint: (5024) Parameter "..." not used
-vm5024
#IFDEF VER3_2
# do not show
# Warning: Constructing a class "TCustomDictionaryEnumerator$4$crc6100464F" with abstract method "GetCurrent"
# Warning: Constructing a class "TCustomDictionaryEnumerator$4$crcBD4794B2" with abstract method "DoMoveNext"
#
# Submitted as https://bugs.freepascal.org/view.php?id=32142
# and https://gitlab.com/freepascal.org/fpc/source/-/issues/40222 .
# Solved now in FPC 3.3.1, so this is only needed with FPC 3.2.x
# (CGE does not support older FPC, see https://castle-engine.io/supported_compilers.php ).
-vm04046
# do not show
# Note: Private type "TCustomPointersEnumerator$2<CASTLEVECTORSINTERNALSINGLE.TGenericVector2,CASTLEVECTORS.TCustomList$1$crc1D7BB6F0.PT>.T" never used
#
# Submitted as https://gitlab.com/freepascal.org/fpc/source/-/issues/40222 .
# Solved now in FPC 3.3.1, so this is only needed with FPC 3.2.x
# (CGE does not support older FPC, see https://castle-engine.io/supported_compilers.php ).
-vm5071
# do not show Warning: Symbol "TArrayHelper$1" is experimental
# Solved in FPC 3.3.1 , does not emit this warning.
-vm05063
#ENDIF
#IFNDEF VER2
#IFNDEF VER3_0
#IFNDEF VER3_1
# do not show
# Note: Call to subroutine "function TGenericVector3.Length:Single;" marked as inline is not inlined
# (In FPC 3.3.1, not in FPC 3.1.1 rev 38027)
#
# Submitted as https://gitlab.com/freepascal.org/fpc/source/-/issues/40222
# for Generics.Collections, and solved for this case.
# But it also affects us in other cases, unrelated to Generics.Collections.
-vm6058
# do not show
# Warning: Local variable "$1" of a managed type does not seem to be initialized
# (a lot of false warnings since FPC 3.3.1)
-vm5089
# do not show
# Warning: Variable "OutputFace" of a managed type does not seem to be initialized
# (3 false warnings since FPC 3.3.1 in Kraft)
-vm5090
# do not show
# Warning: function result variable of a managed type does not seem to be initialized
# (a lot of false warnings since FPC 3.3.1)
-vm5093
#ENDIF
#ENDIF
#ENDIF
# syntax options --------------------------------------------------------
# Default syntax mode.
#
# Some reasons why we prefer -Mobjfpc (not -Mdelphi mode) in FPC:
#
# - There are some things strange in delphi mode, for compatibility with delphi/tp,
# that sometimes bite me (like the fact that in FPC >= 2.0.3
# Single(Integer) makes a variable typecast, not a value typecast).
# TODO: check is the above still true?
#
# - ObjFpc has some nice improvements:
#
# - Assigning procedural variables is better:
# "@" is required to get an address of a procedure,
# and assignment is always checked for parameter correctness.
# In Delphi mode @ may be omitted, and when it's
# not omitted, you can cheat and pass procedure with not matching params.
# Using {$TYPEDADDRESS ON} in Delphi (10.2) helps with this
# (but not in FPC Delphi mode).
#
# - Overloading without the "overload" keyword is often more sane:
# It's not cross-class and cross-unit. This allows to hide ancestor
# methods, while still defining multiple versions of them.
# It avoids a nasty trap of Delphi "overload" described
# at TNoParameterlessContructor documentation.
#
# - Check that method parameter names must differ from class
# fields/methods/properties names --- this is nice, saves you from some
# hard to spot bugs otherwise when renaming.
#
# - ObjFpc is preferred by Lazarus, suggested for new source code by Lazarus.
# So it is just something more familiar for people coming from FPC/Lazarus.
-Mobjfpc
# Enable macros
-Sm
# Enable C-like operators +=, -= etc.
-Sc
# Use ansistrings ("string" = "AnsiString")
-Sh
# Enable inline (although we sometimes surround it in {$ifdef SUPPORTS_INLINE} anyway)
-Si
# units/includes paths --------------------------------------------------
# It seems that FPC does not define symbol UNIX before reading config file,
# even though it defines LINUX (or FREEBSD; I assume that this is also
# the case with DARWIN).
# But I need symbol UNIX *now* to include paths common for all UNIXes.
#IFDEF LINUX
#DEFINE UNIX
#ENDIF
#IFDEF DARWIN
#DEFINE UNIX
#ENDIF
#IFDEF FREEBSD
#DEFINE UNIX
#ENDIF
# Looks like MSWINDOWS symbol needs to be fixed now, just like UNIX above.
#IFDEF WIN32
#DEFINE MSWINDOWS
#ENDIF
#IFDEF WIN64
#DEFINE MSWINDOWS
#ENDIF
#IFNDEF CASTLE_ENGINE_PATHS_ALREADY_DEFINED
# Common paths for all OSes
-Fusrc/base/
-Fisrc/base/
-Fisrc/common_includes/
-Fusrc/base_rendering/
-Fisrc/base_rendering/
-Fusrc/base_rendering/dglopengl/
-Fisrc/base_rendering/dglopengl/
-Fisrc/base_rendering/glsl/generated-pascal/
-Fusrc/fonts/
-Fisrc/fonts/
-Fusrc/window/
-Fisrc/window/
-Fusrc/window/deprecated_units/
-Fisrc/window/deprecated_units/
-Fisrc/window/gtk/
-Fusrc/images/
-Fisrc/images/
-Fusrc/transform/
-Fisrc/transform/
-Fusrc/transform/
-Fisrc/transform/
-Fusrc/scene/x3d/
-Fisrc/scene/x3d/
-Fusrc/scene/load/
-Fisrc/scene/load/
-Fusrc/scene/load/spine/
-Fisrc/scene/load/spine/
-Fusrc/scene/load/md3/
-Fisrc/scene/load/md3/
-Fusrc/scene/load/ifc/
-Fisrc/scene/load/ifc/
-Fusrc/scene/load/collada/
-Fisrc/scene/load/collada/
-Fusrc/scene/load/pasgltf/
-Fisrc/scene/load/pasgltf/
-Fusrc/scene/
-Fisrc/scene/
-Fisrc/scene/glsl/generated-pascal/
-Fusrc/audio/
-Fisrc/audio/
-Fusrc/audio/fmod/
-Fisrc/audio/fmod/
-Fusrc/audio/openal/
-Fisrc/audio/openal/
-Fusrc/audio/ogg_vorbis/
-Fisrc/audio/ogg_vorbis/
-Fusrc/files/
-Fisrc/files/
-Fusrc/files/tools/
-Fisrc/files/tools/
-Fusrc/castlescript/
-Fisrc/castlescript/
-Fusrc/ui/
-Fisrc/ui/
-Fusrc/services/
-Fisrc/services/
-Fusrc/services/steam/
-Fusrc/physics/
-Fisrc/physics/
-Fusrc/physics/kraft/
-Fisrc/physics/kraft/
-Fusrc/deprecated_units/
-Fisrc/deprecated_units/
#IFDEF UNIX
-Fusrc/base/unix/
-Fisrc/base/unix/
-Fusrc/window/unix/
-Fisrc/window/unix/
#ENDIF
#IFDEF MSWINDOWS
-Fusrc/base/windows/
-Fisrc/base/windows/
-Fusrc/window/windows/
-Fisrc/window/windows/
-Fusrc/ui/windows/
-Fisrc/ui/windows/
#ENDIF
#IFDEF ANDROID
-Fusrc/base/android/
-Fisrc/base/android/
#ENDIF
#IFDEF WASI
-Fusrc/base/wasi/
-Fisrc/base/wasi/
#ENDIF
# Vampyre Imaging Library
-Fusrc/vampyre_imaginglib/src/Source
-Fusrc/vampyre_imaginglib/src/Source/JpegLib
-Fusrc/vampyre_imaginglib/src/Source/ZLib
-Fusrc/vampyre_imaginglib/src/Extras/Extensions
-Fusrc/vampyre_imaginglib/src/Extensions/J2KObjects
-Fusrc/vampyre_imaginglib/src/Extensions/LibTiff
-Fusrc/vampyre_imaginglib/src/Extensions
-Fisrc/vampyre_imaginglib/src/Source
-Fisrc/vampyre_imaginglib/src/Source/JpegLib
-Fisrc/vampyre_imaginglib/src/Source/ZLib
-Fisrc/vampyre_imaginglib/src/Extras/Extensions
-Fisrc/vampyre_imaginglib/src/Extensions/J2KObjects
-Fisrc/vampyre_imaginglib/src/Extensions/LibTiff
-Fisrc/vampyre_imaginglib/src/Extensions
-Flsrc/vampyre_imaginglib/src/Extensions/J2KObjects
-Flsrc/vampyre_imaginglib/src/Extensions/LibTiff/Compiled
# This section is useful only for LSP server reading castle-fpc.cfg
# (like our https://github.com/castle-engine/pascal-language-server ).
# These lines allow to search for units inside the additional paths.
# This allows to have code completion in code using
# e.g. CastleDialogs unit (like CGE editor) or CastleClientServer.
#IFDEF USE_UNITS_FROM_LSP
-Fisrc/lcl/
-Fusrc/lcl/
-Fusrc/delphi/
-Fisrc/delphi/
-Fusrc/files/indy/
-Fisrc/files/indy/
#ENDIF
#ENDIF
# others ---------------------------------------------------------------------
#IFDEF ANDROID
# See tools/build-tool/toolcompile.pas for more comments about Android options.
-CpARMV7A
# Necessary to work fast.
# It is possible to compile without this (in such case,
# also compile FPC RTL without this). But the engine will run much slower.
# See https://castle-engine.io/android-FAQ#notes-about-compiling-with-hard-floats--cfvfpv3 .
-CfVFPV3
#ENDIF
# Link with Cocoa. This is necessary here to compile the build tool using
# tools/build-tool/castle-engine_compile.sh .
#IFDEF DARWIN
#IFDEF CPUX86_64
-k-framework
-kCocoa
#ENDIF
#ENDIF
# debug specific -------------------------------------------------
#IFDEF DEBUG
#WRITE Compiling Debug Version
# range checks
-Cr
# overflow checks
-Co
# Stack overflow checks.
#
# castle fails with stack checking errors on x86-64.
# Otherwise, works OK, so I guess it's FPC bug.
# TODO: make testcase and submit. For now, stack checking is not
# done on x86-64.
#
# It also causes failures on Android with pthread in castleandroidnativeappglue.pas.
#IFNDEF CPUX86_64
#IFNDEF ANDROID
-Ct
#ENDIF
#ENDIF
# assertions checks
-Sa
# virtual method table checks
-CR
# trash local variables (to detect uninitialized uses)
-gt
# debug info for gdb and browser.
-g
#-bl
# LineMode unit for backtraces with line info.
-gl
# HeapTrc unit to track memory leaks.
#
# -gh is not enabled by default, because
# it produces confusing output when the program exits with
# exception (like from ProgramBreak) or Halt: it will always show
# some leaked memory in this case. Indeed, FPC always leaks memory then,
# this is FPC problem (although harmless, since in this case OS
# will free this memory anyway).
#
# If you understand this, you can (and should) enable -gh and use
# it to catch memory leaks in your programs.
# There should be *no* memory leaks from Castle Game Engine
# when the program exits in a usual fashion.
#-gh
# We do not check pointer validity.
#
# We experimented with this, but it was a significant burden to make it work,
# as we interact with many external libraries.
# It would make many false errors (when we dereference memory allocated
# by other libraries, e.g. libpng or gtk). We were masking it by
#
# { We dereference here memory allocated with XXX, so pointer checks
# will make false errors. }
# {$checkpointer off}
# .... // here work with external library
# {$ifdef KAMBI_CHECK_POINTER}
# { Turn checkpointer back on }
# {$checkpointer on}
# {$endif}
#
# (We needed -dKAMBI_CHECK_POINTER for this trick, since {$ifopt checkpointer}
# doesn't work.)
# But this was error prone, so a lot of valid code could still report
# false errors, unless we would "sprinkle" the above constructions, with
# {$checkpointer off}, all around CGE code.
#
# Also, -gc for whole code makes it much slower.
#
# Note that -gc requires -gh because checking pointer
# validity is part of HeapTrc unit.
#-gc
#-dKAMBI_CHECK_POINTER
#ENDIF
# profiling ------------------------------------------------------------------
#
# Profiling options should be used without -dDEBUG,
# -dDEBUG code may be (slightly) slower in (slightly)
# different places because of debug checks (range, overflow, stack checks etc.).
#
# They generally should be used with -dRELEASE, as you want to profile
# program timings experienced by the user, although sometimes -dRELASE may cause
# optimizations that may obfuscate profiler output.
# So sometimes yoy may want to undefine both DEBUG and RELEASE.
# gprof
# -pg
# valgrind
#-gl
#-gv
# release specific -----------------------------------------------
#IFDEF DARWIN
#IFDEF CPUAARCH64
#WRITE Disabling FPC optimizations, known to be buggy on Darwin/aarch64
#DEFINE CASTLE_DISABLE_OPTIMIZATIONS
#ENDIF
#ENDIF
#IFDEF RELEASE
#WRITE Compiling Release Version
# optimize : level 2, faster code
#IFDEF CASTLE_DISABLE_OPTIMIZATIONS
-O-
#ELSE
-O2
#ENDIF
#-OG # obsolete, FPC optimizes for faster code always
# (Don't optimize for Pentium;
# 1. there are still some people with older i386 processors ?
# 2. these Pentium-specific optimizations don't seem to give *any*
# real improvement for my code (checked with rayhunter
# with FPC 1.0.10; TODO -- do some speed checks with FPC 2.0.0))
# Note: remember, if you enable it, wrap it in #IFDEF CPUI386
# -Op2
# (smartlink turned off because REALLY slows down compilation
# and doesn't reduce size of my programs too much)
#-CX
#-XX
# strip symbols from exe (symbols are used only in debugging)
-Xs
#ENDIF
# eof --------------------------------------------------------------------------
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )