Commit Graph

11 Commits

Author SHA1 Message Date
Paul Sokolovsky
f469c76442 py: Rename __QSTR_EXTRACT flag to NO_QSTR.
It has more usages than just qstr extraction, for example, embedding (where
people don't care about efficient predefined qstrs).
2016-06-16 01:42:48 +03:00
stijn
29c8c8aecb windows/msvc: Rewrite qstr auto-generation.
Builds have been broken since reworking autogeneration in c618f91 and
related, this gets fixed here by applying similar qstr generation logic
for the msvc builds: c files are only preprocessed when changed (or not
yet preprocessed) and the concatenated output is fed into makeqstrdefs.py.
To speed up this process, the concatenated output is already filtered to
contain only lines which makeqstrdefs really needs: this makes the qstr
generation stage about twice as fast (checked on different machines).
2016-04-25 22:34:24 +01:00
stijn
9a627e8881 windows/msvc: Implement automatic qstr generation using makeqstrdefs.
Note this still needs some work: currently all source files are always
preprocessed no matter which one actually changed, moreover that happens
file by file without any parallellism so builds are painstakingly slow.
2016-04-16 13:19:15 +01:00
stijn
967ceba5b7 msvc: Use different output directories depending on build type
This allows multiple versions (e.g. Debug/Release, x86/x64) of micropython.exe
to co-exist instead and also solves potential problems where msbuild does not
completely rebuild the output and/or pdb files when switching between builds,
which in turn can cause linker errors in dependent projects.

By default exe/map/... files go in windows/build/$(Configuration)$(Platform)

After each build micropython.exe is still copied from the above directory to
the windows directory though, as that is consistent with the other ports and
the test runner by default uses that location as well.

Also rename env.props -> path.props which is a clearer name,
and add ample documentation in the affected build files.

(also see discussion in #1538)
2015-12-11 23:42:30 +02:00
stijn
b1dbbd32eb windows: Allow specifying the python executable to use for msvc builds
This defaults to 'python' but can be now overridden if needed
2015-11-10 17:37:09 +02:00
Damien George
95f53461c2 py: Replace py-version.sh with makeversionhdr.py, written in Python.
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
2015-04-28 23:52:36 +01:00
stijn
c52f1258a8 msvc: Update genhdr script to emit MicroPython version numbers 2015-04-22 12:07:30 +02:00
stijn
ffc96a901a msvc: Use single build target for dealing with generated files
Remove some duplication in the code for generating
qstrdefs.generated.h and py-version.h
2015-01-02 16:55:02 +01:00
stijn
8dec62a1a4 msvc: Define main build/include directories in a single location
- Use a single file env.props for defining the main directories used when building.
  env.props resolves the base directory and defines overridable output directories,
  and is used by all other build files.
- Fix the build currently failing, basically because the preprocessing command for generating
  qstrdefs uses different include directories than the build itself does.
  (specifically, qstrdefs.h uses #include "py/mpconfig.h" since the fixes for #1022
  in 51dfcb4, so we need to use the base directory as include directory, not the py dir itself).
  So define a single variable containing the include directories instead and use it where needed.
2015-01-02 16:52:07 +01:00
stijn
48d641e41a msvc: Only update generated headers when there are changes
This fixes generating the headers casuing complete rebuilds,
even when the headere's content didn't really change.
2014-05-28 16:03:38 +02:00
stijn
01d6be4d51 Windows MSVC port
Extend the windows port so it compiles with the toolchain from Visual Studio 2013
2014-05-08 10:06:43 +02:00