sdk
sdk copied to clipboard
Sometimes relative paths in GYP ldflags section is "off by one"
In platforms/stm/disco_fletch.gyp we have the following comment:
'ldflags': [
'-specs=nosys.specs',
'-specs=nano.specs',
# TODO(340): Why does this not work???
#'-T<(generated_path)/SW4STM32/configuration/STM32F746NGHx_FLASH.ld',
# TODO(340): Why is this needed???
'-T../../platforms/stm/disco_fletch/generated/SW4STM32/'
'configuration/STM32F746NGHx_FLASH.ld'
],
The variable generated_path is ../../platforms/stm/disco_fletch/generated/, and works in other rules, but in ldflags an additional .. is added to the generated project.
You have to put a relative file name in a variable named something ending with "_dir" or "_file". See Pathname Relativization.
I cannot get pathname relativization to work for ldflags.
Asked on gyp-developer: https://groups.google.com/forum/#!topic/gyp-developer/W_yZcIsFXEc.